From 17444ff07b6568babb28ca4d4951af371997b101 Mon Sep 17 00:00:00 2001 From: synqotik Date: Thu, 12 Oct 2023 16:33:46 -0400 Subject: [PATCH 1/2] NMS-16116: Update node structure page to accept query strings --- ui/src/App.vue | 4 + .../Nodes/ManagementIPTooltipCell.vue | 5 +- ui/src/components/Nodes/NodeDetailsDialog.vue | 4 +- .../components/Nodes/NodeStructurePanel.vue | 92 +-- ui/src/components/Nodes/NodesTable.vue | 134 ++-- .../Nodes/hooks/useIpInterfaceQuery.ts | 57 ++ .../components/Nodes/hooks/useNodeExport.ts | 130 +++ ui/src/components/Nodes/hooks/useNodeQuery.ts | 175 ++++ ui/src/components/Nodes/utils.ts | 270 +------ ui/src/containers/Nodes.vue | 23 +- ui/src/stores/nodeStore.ts | 1 - ui/src/stores/nodeStructureStore.ts | 87 +- ui/src/types/index.ts | 13 +- ui/yarn.lock | 750 +++++++++--------- 14 files changed, 946 insertions(+), 799 deletions(-) create mode 100644 ui/src/components/Nodes/hooks/useIpInterfaceQuery.ts create mode 100644 ui/src/components/Nodes/hooks/useNodeExport.ts create mode 100644 ui/src/components/Nodes/hooks/useNodeQuery.ts diff --git a/ui/src/App.vue b/ui/src/App.vue index 23b3b6d4f2f3..b29fe67360dd 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -32,10 +32,12 @@ import { useAuthStore } from '@/stores/authStore' import { useInfoStore } from '@/stores/infoStore' import { usePluginStore } from '@/stores/pluginStore' import { useMenuStore } from '@/stores/menuStore' +import { useNodeStructureStore } from '@/stores/nodeStructureStore' const authStore = useAuthStore() const infoStore = useInfoStore() const menuStore = useMenuStore() +const nodeStructureStore = useNodeStructureStore() const pluginStore = usePluginStore() onMounted(() => { @@ -43,6 +45,8 @@ onMounted(() => { infoStore.getInfo() menuStore.getMainMenu() menuStore.getNotificationSummary() + nodeStructureStore.getCategories() + nodeStructureStore.getMonitoringLocations() pluginStore.getPlugins() }) diff --git a/ui/src/components/Nodes/ManagementIPTooltipCell.vue b/ui/src/components/Nodes/ManagementIPTooltipCell.vue index 1d1548481b66..d7dc13327149 100644 --- a/ui/src/components/Nodes/ManagementIPTooltipCell.vue +++ b/ui/src/components/Nodes/ManagementIPTooltipCell.vue @@ -16,7 +16,10 @@ import { IpInterface, Node } from '@/types' import { FeatherTooltip, PointerAlignment, PopoverPlacement } from '@featherds/tooltip' import { PropType } from 'vue' -import { IpInterfaceInfo, getBestIpInterfaceForNode } from './utils' +import { IpInterfaceInfo } from '@/types' +import { useIpInterfaceQuery } from '@/components/Nodes/hooks/useIpInterfaceQuery' + +const { getBestIpInterfaceForNode } = useIpInterfaceQuery() const props = defineProps({ computeNodeIpInterfaceLink: { diff --git a/ui/src/components/Nodes/NodeDetailsDialog.vue b/ui/src/components/Nodes/NodeDetailsDialog.vue index f55945582ec8..cd8504c5ec20 100644 --- a/ui/src/components/Nodes/NodeDetailsDialog.vue +++ b/ui/src/components/Nodes/NodeDetailsDialog.vue @@ -17,7 +17,8 @@