From 6f7cf931da15f413f3f325a47adc0b7ba8f0700c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Paunovi=C4=87?= Date: Wed, 24 Jul 2024 09:33:10 +0200 Subject: [PATCH] fix(ui): pass proper namespace `id` attribute to dependencies tab (#4411) --- ui/src/components/namespace/NamespaceDependencies.vue | 10 +++++----- .../namespace/NamespaceDependenciesWrapper.vue | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ui/src/components/namespace/NamespaceDependencies.vue b/ui/src/components/namespace/NamespaceDependencies.vue index 6bea06a026..f5087ac4d5 100644 --- a/ui/src/components/namespace/NamespaceDependencies.vue +++ b/ui/src/components/namespace/NamespaceDependencies.vue @@ -29,7 +29,7 @@ const hasNodes = ref(false); const props = defineProps({ - id: { + namespace: { type: String, required: true } @@ -38,9 +38,9 @@ const load = () => { isLoading.value = true; return axios - .get(`${apiUrl(store)}/namespaces/${props.id}/dependencies`) + .get(`${apiUrl(store)}/namespaces/${props.namespace}/dependencies`) .then(response => { - loaded.value.push(`${props.id}`) + loaded.value.push(`${props.namespace}`) if (Object.keys(response.data).length > 0) { dependencies.value.nodes.push(...response.data.nodes) @@ -141,7 +141,7 @@ loaded: loaded.value.indexOf(node.uid) >= 0, namespace: node.namespace, flowId: node.id, - current: node.id === props.id, + current: node.id === props.namespace, color: "pink", link: true } @@ -166,7 +166,7 @@ }; onMounted(() => { - if (props.id !== undefined) { + if (props.namespace !== undefined) { load(); } }) diff --git a/ui/src/components/namespace/NamespaceDependenciesWrapper.vue b/ui/src/components/namespace/NamespaceDependenciesWrapper.vue index e55bd27491..37056df3aa 100644 --- a/ui/src/components/namespace/NamespaceDependenciesWrapper.vue +++ b/ui/src/components/namespace/NamespaceDependenciesWrapper.vue @@ -1,10 +1,14 @@ \ No newline at end of file