From 34a4fedbf8bf17bb9555349bfe74cb3952443c32 Mon Sep 17 00:00:00 2001 From: RoryPTB <47696929+RoryPTB@users.noreply.github.com> Date: Fri, 16 Aug 2024 18:07:27 +0200 Subject: [PATCH] feat: only show inspect button for BUFR files --- .../monitoring/NotificationDashboard.vue | 10 ++- src/components/monitoring/PublishedData.vue | 66 ++++++++++--------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/src/components/monitoring/NotificationDashboard.vue b/src/components/monitoring/NotificationDashboard.vue index 1b20e6c..d65184b 100644 --- a/src/components/monitoring/NotificationDashboard.vue +++ b/src/components/monitoring/NotificationDashboard.vue @@ -215,10 +215,13 @@ export default defineComponent({ // Methods // Method to get canonical URL from a message - const getCanonicalUrl = (links) => { + const getCanonicalInfo = (links) => { const canonicalLink = links.find(link => link.rel === "canonical"); if (canonicalLink) { - return canonicalLink.href; + return { + 'url': canonicalLink.href, + 'type': canonicalLink.type + }; } return ''; } @@ -228,7 +231,8 @@ export default defineComponent({ const selectedFields = features.map(item => ({ id: item.id, pubtime: new Date(item.properties.pubtime), - canonical_url: getCanonicalUrl(item.links), + canonical_url: getCanonicalInfo(item.links).url, + type: getCanonicalInfo(item.links).type, wsi: item.properties.wigos_station_identifier, coordinates: item.geometry?.coordinates ?? null // Geometry may not be present })); diff --git a/src/components/monitoring/PublishedData.vue b/src/components/monitoring/PublishedData.vue index 50fa540..32a5313 100644 --- a/src/components/monitoring/PublishedData.vue +++ b/src/components/monitoring/PublishedData.vue @@ -5,33 +5,34 @@ - +
-