Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix(frontend): byt-771 fetch debug status on startup (#1644)
Liu Ji714a8e334a91
diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vueindex d872591913..e546c33bf0 100644--- a/frontend/src/components/ProvideDashboardContext.vue+++ b/frontend/src/components/ProvideDashboardContext.vue@@ -11,6 +11,7 @@ import {useUIStateStore,useProjectStore,useLabelStore,+ useDebugStore,} from "@/store";import { defineComponent } from "vue";import { DEFAULT_PROJECT_ID } from "../types";@@ -32,6 +33,7 @@ export default defineComponent({useProjectStore().fetchProjectById(DEFAULT_PROJECT_ID),useLabelStore().fetchLabelList(),useUIStateStore().restoreState(),+ useDebugStore().fetchDebug(),]);},});diff --git a/frontend/src/components/ProvideSQLEditorContext.vue b/frontend/src/components/ProvideSQLEditorContext.vueindex 7a57849f8e..0cfb1a68ad 100644--- a/frontend/src/components/ProvideSQLEditorContext.vue+++ b/frontend/src/components/ProvideSQLEditorContext.vue@@ -15,6 +15,7 @@ import {useSQLEditorStore,useTabStore,useSheetStore,+ useDebugStore,} from "@/store";import {Instance,@@ -153,5 +154,6 @@ onMounted(async () => {await prepareAccessibleConnectionByProject();await prepareSQLEditorContext();await prepareSheetFromQuery();+ await useDebugStore().fetchDebug();});</script>diff --git a/frontend/src/store/modules/debug.ts b/frontend/src/store/modules/debug.tsindex 8f8da70bac..ac5441c67c 100644--- a/frontend/src/store/modules/debug.ts+++ b/frontend/src/store/modules/debug.ts@@ -16,8 +16,8 @@ export const useDebugStore = defineStore("debug", {this.isDebug = debug.isDebug;},async fetchDebug() {- const data = (await axios.get("/api/debug")).data;- const debug = convert(data);+ const res = (await axios.get("/api/debug")).data;+ const debug = convert(res.data);this.setDebug(debug);return debug;},