Skip to content

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

chore: remove instance prefix in instance view (#7753)

Liu Ji3681cb944581
diff --git a/frontend/src/views/sql-editor/AsidePanel/TreeNode/Prefix.vue b/frontend/src/views/sql-editor/AsidePanel/TreeNode/Prefix.vue
index a1da14ecc3..61634103e9 100644
--- a/frontend/src/views/sql-editor/AsidePanel/TreeNode/Prefix.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/TreeNode/Prefix.vue
@@ -14,6 +14,7 @@
<template v-else-if="atom.type === 'database'">
<span class="flex items-center gap-x-1">
<InstancePrefix
+ v-if="connectionTreeStore.tree.mode === ConnectionTreeMode.PROJECT"
:instance="database.instanceEntity"
:environment="environment"
:disabled="atom.disabled"
@@ -30,12 +31,14 @@ import {
useDatabaseV1Store,
useInstanceV1Store,
useEnvironmentV1Store,
+ useConnectionTreeStore,
} from "@/store";
import {
ConnectionAtom,
unknownInstance,
unknownDatabase,
unknownEnvironment,
+ ConnectionTreeMode,
} from "@/types";
import InstancePrefix from "./InstancePrefix.vue";
@@ -46,6 +49,7 @@ const props = defineProps<{
const instanceStore = useInstanceV1Store();
const databaseStore = useDatabaseV1Store();
const environmentStore = useEnvironmentV1Store();
+const connectionTreeStore = useConnectionTreeStore();
const instance = computed(() => {
const { atom } = props;