Skip to content

Commit

Permalink
fix(ui): pass proper namespace id attribute to dependencies tab (#4411
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MilosPaunovic authored Jul 24, 2024
1 parent 1f13c36 commit 6f7cf93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ui/src/components/namespace/NamespaceDependencies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
const hasNodes = ref(false);
const props = defineProps({
id: {
namespace: {
type: String,
required: true
}
Expand All @@ -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)
Expand Down Expand Up @@ -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
}
Expand All @@ -166,7 +166,7 @@
};
onMounted(() => {
if (props.id !== undefined) {
if (props.namespace !== undefined) {
load();
}
})
Expand Down
6 changes: 5 additions & 1 deletion ui/src/components/namespace/NamespaceDependenciesWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<template>
<NamespaceDependencies :id="route.params.id" />
<NamespaceDependencies :namespace="namespace" />
</template>

<script setup>
import {computed} from "vue";
import {useRoute} from "vue-router";
const route = useRoute();
const namespace = computed(() => route.params.id);
import NamespaceDependencies from "./NamespaceDependencies.vue";
</script>

0 comments on commit 6f7cf93

Please sign in to comment.