Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Show breadcrumb when not in Home page and some style tweak

Tianzhou Chen2434d18734c7
diff --git a/frontend/src/components/Breadcrumb.vue b/frontend/src/components/Breadcrumb.vue
index b5af769238..7b11bd4f74 100644
--- a/frontend/src/components/Breadcrumb.vue
+++ b/frontend/src/components/Breadcrumb.vue
@@ -114,22 +114,29 @@ export default {
currentRoute
);
const pipelineId = routeSlug.pipelineId;
+ const instanceId = routeSlug.instanceId;
const list: Array<BreadcrumbItem> = [];
if (pipelineId) {
list.push({
- name: "Pipeline",
+ name: "Pipeline #" + pipelineId,
+ path: "/pipeline/" + pipelineId,
});
+ } else if (instanceId) {
list.push({
- name: pipelineId,
- path: "/pipeline/" + pipelineId,
+ name: "Instance",
+ path: "/instance",
+ });
+ list.push({
+ name: instanceId,
+ path: "/instance/" + instanceId,
});
- } else {
- // if (currentRoute.meta.displayName) {
- // list.push({
- // name: currentRoute.meta.displayName,
- // path: currentRoute.path,
- // });
- // }
+ } else if (currentRoute.path != "/") {
+ if (currentRoute.meta.displayName) {
+ list.push({
+ name: currentRoute.meta.displayName,
+ path: currentRoute.path,
+ });
+ }
}
return list;
});
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 55bcbbac47..53c59f52b2 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -130,7 +130,7 @@
</svg>
</button>
</div>
- <div class="ml-4">
+ <div v-if="!isHome" class="ml-4">
<Breadcrumb />
</div>
</div>
@@ -138,7 +138,7 @@
<main class="w-full mx-auto lg:flex overflow-y-auto">
<!-- main wrapper -->
<div class="lg:min-w-0 lg:flex-1">
- <div class="hidden lg:block px-4">
+ <div v-if="!isHome" class="hidden lg:block px-4 mt-4">
<Breadcrumb />
</div>
@@ -168,12 +168,19 @@ export default {
Breadcrumb,
},
setup(props, ctx) {
+ const router = useRouter();
+
const state = reactive<LocalState>({
showMobileOverlay: false,
});
+ const isHome = computed(() => {
+ return router.currentRoute.value.path == "/";
+ });
+
return {
state,
+ isHome,
};
},
};