From ca925b791ced7d6b3028666927f878069ac2c108 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Mon, 2 Feb 2026 19:01:48 +1300 Subject: [PATCH 01/22] Refactor: format code --- .../ConnectivityList/ConnectivityList.vue | 302 +++++++++--------- 1 file changed, 151 insertions(+), 151 deletions(-) diff --git a/src/components/ConnectivityList/ConnectivityList.vue b/src/components/ConnectivityList/ConnectivityList.vue index 853684f..fac1ffd 100644 --- a/src/components/ConnectivityList/ConnectivityList.vue +++ b/src/components/ConnectivityList/ConnectivityList.vue @@ -19,172 +19,172 @@ {{ connectivityError.errorMessage }} - {{ entry.paths }} -
-
- Origin - - - - Origin {{ originDescription }} - - -
-
- - - Search connectivity - - {{ capitalise(origin) }} -
- +
+ Origin + - Explore origin data - + + + Origin {{ originDescription }} + +
-
- Components -
-
- - - Search connectivity - - {{ capitalise(component) }} -
+ + Search connectivity + + {{ capitalise(origin) }} +
+ + Explore origin data + +
+
+
+ Components
-
- Destination - - - - Destination is where the axons terminate - - -
-
- - - Search connectivity - - {{ capitalise(destination) }} -
- + + + + + Search connectivity + + {{ capitalise(component) }} +
+
+
+
+ Destination + - Explore destination data - + + + Destination is where the axons terminate + +
- - Search for data on components - + + Search connectivity + + {{ capitalise(destination) }}
+ + Explore destination data + +
+
+ + Search for data on components + +
From 8f6e88699821f31f0f901dc5fddaf6be8f9a4adb Mon Sep 17 00:00:00 2001 From: akhuoa Date: Tue, 24 Feb 2026 10:58:20 +1300 Subject: [PATCH 02/22] Add new connectivity-ilst component --- src/components.d.ts | 1 + .../CompetencyQueries/CompetencyQueries.js | 43 ++ .../ConnectivityList/ConnectivityListNew.vue | 542 ++++++++++++++++++ src/components/index.js | 4 + 4 files changed, 590 insertions(+) create mode 100644 src/components/ConnectivityList/ConnectivityListNew.vue diff --git a/src/components.d.ts b/src/components.d.ts index 534c46f..d26b572 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -11,6 +11,7 @@ declare module 'vue' { ConnectionDialog: typeof import('./components/DrawToolbar/ConnectionDialog.vue')['default'] ConnectivityGraph: typeof import('./components/ConnectivityGraph/ConnectivityGraph.vue')['default'] ConnectivityList: typeof import('./components/ConnectivityList/ConnectivityList.vue')['default'] + ConnectivityListNew: typeof import('./components/ConnectivityList/ConnectivityListNew.vue')['default'] CopyToClipboard: typeof import('./components/CopyToClipboard/CopyToClipboard.vue')['default'] CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default'] DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default'] diff --git a/src/components/CompetencyQueries/CompetencyQueries.js b/src/components/CompetencyQueries/CompetencyQueries.js index b2d21b5..acaf309 100644 --- a/src/components/CompetencyQueries/CompetencyQueries.js +++ b/src/components/CompetencyQueries/CompetencyQueries.js @@ -28,6 +28,48 @@ async function _postRequest(API_URL, payload) { } } +/** + * CQ query 27 [temp]: Single Connectivity List + * @param {*} mapuuid + * @param {*} pathId + * @returns combined connectivity list + */ +async function querySingleConnectivityList (mapuuid, pathId) { + const API_URL = 'http://localhost:9000/27'; // TODO: to update to the actual endpoint when ready + const payload = { + "query_id": "27", + "parameters": [ + { + "column": "source_id", + "value": [mapuuid] + }, + { + "column": "path_id", + "value": [pathId] + } + ] + }; + + try { + const response = await fetch(API_URL, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(payload), + }); + + if (!response.ok) { + throw new Error(`API Error: ${response.status} ${response.statusText}`); + } + + return await response.json(); + } catch (error) { + console.error("Request failed:", error); + throw error; + } +} + /** * Competency Query * @public @@ -392,4 +434,5 @@ export { queryPathsByDestination, queryPathsByRoute, queryForwardBackwardConnections, + querySingleConnectivityList, }; diff --git a/src/components/ConnectivityList/ConnectivityListNew.vue b/src/components/ConnectivityList/ConnectivityListNew.vue new file mode 100644 index 0000000..2d94c00 --- /dev/null +++ b/src/components/ConnectivityList/ConnectivityListNew.vue @@ -0,0 +1,542 @@ + + + + + diff --git a/src/components/index.js b/src/components/index.js index d3bc027..27d7c1c 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -2,6 +2,7 @@ import AnnotationPopup from "./Tooltip/AnnotationPopup.vue"; import CreateTooltipContent from "./Tooltip/CreateTooltipContent.vue"; import ConnectivityGraph from "./ConnectivityGraph/ConnectivityGraph.vue"; import ConnectivityList from "./ConnectivityList/ConnectivityList.vue"; +import ConnectivityListNew from "./ConnectivityList/ConnectivityListNew.vue"; import CopyToClipboard from "./CopyToClipboard/CopyToClipboard.vue"; import DrawToolbar from "./DrawToolbar/DrawToolbar.vue"; import HelpModeDialog from "./HelpModeDialog/HelpModeDialog.vue"; @@ -16,6 +17,7 @@ import { queryPathsByDestination, queryPathsByRoute, queryForwardBackwardConnections, + querySingleConnectivityList, } from "./CompetencyQueries/CompetencyQueries.js"; import { filterOrigins, @@ -37,6 +39,7 @@ export { CreateTooltipContent, ConnectivityGraph, ConnectivityList, + ConnectivityListNew, CopyToClipboard, DrawToolbar, HelpModeDialog, @@ -50,6 +53,7 @@ export { queryPathsByDestination, queryPathsByRoute, queryForwardBackwardConnections, + querySingleConnectivityList, filterOrigins, filterDestinations, filterViaLocations, From c63786231652ff1f0621deccc3a9017a43643aec Mon Sep 17 00:00:00 2001 From: akhuoa Date: Tue, 24 Feb 2026 12:46:29 +1300 Subject: [PATCH 03/22] Fix connectivity key combination --- src/components/ConnectivityList/ConnectivityListNew.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ConnectivityList/ConnectivityListNew.vue b/src/components/ConnectivityList/ConnectivityListNew.vue index 2d94c00..9e93dde 100644 --- a/src/components/ConnectivityList/ConnectivityListNew.vue +++ b/src/components/ConnectivityList/ConnectivityListNew.vue @@ -42,7 +42,7 @@ v-for="(origin, i) in originsCombinations" class="attribute-content" :origin-item-label="origin.mapLabel" - :key="origin.sckanId" + :key="origin.sckanLabel" @mouseenter="onConnectivityHovered(origin, $event)" @mouseleave="onConnectivityHovered()" > @@ -94,7 +94,7 @@ v-for="(component, i) in componentsCombinations" class="attribute-content" :component-item-label="component.mapLabel" - :key="component.sckanId" + :key="component.sckanLabel" @mouseenter="onConnectivityHovered(component, $event)" @mouseleave="onConnectivityHovered()" > @@ -148,7 +148,7 @@ v-for="(destination, i) in destinationsCombinations" class="attribute-content" :destination-item-label="destination.mapLabel" - :key="destination.sckanId" + :key="destination.sckanLabel" @mouseenter="onConnectivityHovered(destination, $event)" @mouseleave="onConnectivityHovered()" > @@ -333,7 +333,7 @@ export default { this.connectivityError.errorMessage = `${combination.sckanLabel} from the SCKAN is not available on the Map.`; } else if (combination.mapId) { - if (combination.sckanId !== combination.mapId) { + if (JSON.stringify(combination.sckanId) !== JSON.stringify(combination.mapId)) { this.connectivityError.hasError = true; this.connectivityError.errorMessage = `${combination.sckanLabel} from the SCKAN From 23460e6f1eefcc26d0e6e34224ae975a0c072ae7 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Tue, 24 Feb 2026 13:03:51 +1300 Subject: [PATCH 04/22] Separate different types of errors --- .../ConnectivityList/ConnectivityListNew.vue | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/ConnectivityList/ConnectivityListNew.vue b/src/components/ConnectivityList/ConnectivityListNew.vue index 9e93dde..6021491 100644 --- a/src/components/ConnectivityList/ConnectivityListNew.vue +++ b/src/components/ConnectivityList/ConnectivityListNew.vue @@ -8,7 +8,7 @@ :teleported="false" placement="left-start" :visible="(connectivityError.hasError && connectivityError.errorMessage ? true : false)" - popper-class="connectivity-error-container" + :popper-class="connectivityError.errorType === 'warning' ? 'connectivity-warning-container' : 'connectivity-error-container'" >