From 545f5c6c9354bfe7d6b9de7089f49b192081a888 Mon Sep 17 00:00:00 2001
From: Haqeem Solehan <93633646+julap99@users.noreply.github.com>
Date: Tue, 27 May 2025 11:39:25 +0800
Subject: [PATCH] Add Metabase integration with token generation API and update
navigation
---
components/layouts/Breadcrumb.vue | 18 ++++-----
navigation/index.js | 6 +++
nuxt.config.js | 4 ++
pages/metabase/index.vue | 49 +++++++++++++++++++++++
prisma/schema.prisma | 66 +++++++++++++++----------------
server/api/metabase/token.get.js | 28 +++++++++++++
6 files changed, 129 insertions(+), 42 deletions(-)
create mode 100644 pages/metabase/index.vue
create mode 100644 server/api/metabase/token.get.js
diff --git a/components/layouts/Breadcrumb.vue b/components/layouts/Breadcrumb.vue
index cc8bc97..0d6f142 100644
--- a/components/layouts/Breadcrumb.vue
+++ b/components/layouts/Breadcrumb.vue
@@ -6,13 +6,15 @@ const breadcrumb = computed(() => {
let breadcrumb = null;
const matched = route.matched;
+ console.log("matched:", matched);
+
if (matched[matched.length - 1].meta?.breadcrumb) {
breadcrumb = matched[matched.length - 1].meta.breadcrumb;
} else {
// if no breadcrumb in page meta, get breadcrumb from route matched
breadcrumb = matched.map((item) => {
return {
- name: item.meta.title,
+ name: item.name,
path: item.path,
};
});
@@ -33,10 +35,12 @@ const breadcrumb = computed(() => {
return breadcrumb;
});
+console.log("breadcrumb", breadcrumb);
+
// Get title from page meta
const title = computed(() => {
const matched = route.matched;
- const title = matched[matched.length - 1].meta.title;
+ const title = matched[matched.length - 1].name;
return title;
});
@@ -58,11 +62,7 @@ async function navigateMenu(path) {
+ Metabase is a powerful data visualization and analytics tool that allows you to + create and share dashboards, reports, and visualizations with your team. +
+