Skip to content

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

chore: hide export buttons (#9207)

boojackf1aa8d100004
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
index 875993f02d..d0ce9647ce 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/SingleResultViewV1.vue
@@ -61,21 +61,23 @@
{{ $t("plugin.ai.chat-sql") }}
</template>
</NTooltip>
- <DataExportButton
- v-if="showExportButton"
- size="small"
- :disabled="props.result === null || isEmpty(props.result)"
- :support-formats="[
- ExportFormat.CSV,
- ExportFormat.JSON,
- ExportFormat.SQL,
- ExportFormat.XLSX,
- ]"
- @export="handleExportBtnClick"
- />
- <NButton v-else @click="state.showRequestExportPanel = true">
- {{ $t("quick-action.request-export-data") }}
- </NButton>
+ <template v-if="showExportButton">
+ <DataExportButton
+ v-if="allowToExport"
+ size="small"
+ :disabled="props.result === null || isEmpty(props.result)"
+ :support-formats="[
+ ExportFormat.CSV,
+ ExportFormat.JSON,
+ ExportFormat.SQL,
+ ExportFormat.XLSX,
+ ]"
+ @export="handleExportBtnClick"
+ />
+ <NButton v-else @click="state.showRequestExportPanel = true">
+ {{ $t("quick-action.request-export-data") }}
+ </NButton>
+ </template>
</div>
</div>
@@ -171,6 +173,7 @@ import {
hasWorkspacePermissionV1,
instanceV1HasStructuredQueryResult,
} from "@/utils";
+import { customTheme } from "@/utils/customTheme";
import DataTable from "./DataTable";
import EmptyView from "./EmptyView.vue";
import ErrorView from "./ErrorView.vue";
@@ -236,6 +239,10 @@ const showSearchFeature = computed(() => {
});
const showExportButton = computed(() => {
+ return customTheme.value !== "lixiang";
+});
+
+const allowToExport = computed(() => {
if (!featureToRef("bb.feature.access-control").value) {
// The current plan doesn't have access control feature.
// Fallback to true.