Skip to content

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

fix: correct postgres column list to account for sensitive column (#4733)

Tianzhou (天舟)f8a0c247ea67
diff --git a/frontend/src/components/ColumnTable.vue b/frontend/src/components/ColumnTable.vue
index cac47423ca..2265167389 100644
--- a/frontend/src/components/ColumnTable.vue
+++ b/frontend/src/components/ColumnTable.vue
@@ -177,26 +177,36 @@ export default defineComponent({
}
return columnList;
});
- const POSTGRES_COLUMN_LIST = computed((): BBTableColumn[] => [
- {
- title: t("common.name"),
- },
- {
- title: t("common.type"),
- },
- {
- title: t("common.Default"),
- },
- {
- title: t("database.nullable"),
- },
- {
- title: t("db.collation"),
- },
- {
- title: t("database.comment"),
- },
- ]);
+ const POSTGRES_COLUMN_LIST = computed(() => {
+ const columnList: BBTableColumn[] = [
+ {
+ title: t("common.name"),
+ },
+ {
+ title: t("common.type"),
+ },
+ {
+ title: t("common.Default"),
+ },
+ {
+ title: t("database.nullable"),
+ },
+ {
+ title: t("db.collation"),
+ },
+ {
+ title: t("database.comment"),
+ },
+ ];
+ if (showSensitiveColumn.value) {
+ columnList.unshift({
+ title: t("database.sensitive"),
+ center: true,
+ nowrap: true,
+ });
+ }
+ return columnList;
+ });
const CLICKHOUSE_SNOWFLAKE_COLUMN_LIST = computed((): BBTableColumn[] => [
{
title: t("common.name"),
diff --git a/frontend/src/views/sql-editor/EditorCommon/DataTable.vue b/frontend/src/views/sql-editor/EditorCommon/DataTable.vue
index 3a322f1b00..cfd09aef22 100644
--- a/frontend/src/views/sql-editor/EditorCommon/DataTable.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/DataTable.vue
@@ -26,11 +26,11 @@
v-bind="tableResize.getColumnProps(header.index)"
>
<div class="flex items-center overflow-hidden">
+ <span> {{ header.column.columnDef.header }}</span>
<SensitiveDataIcon
v-if="isSensitiveColumn(header.index)"
- class="mr-0.5 shrink-0"
+ class="ml-0.5 shrink-0"
/>
- <span> {{ header.column.columnDef.header }}</span>
</div>
<!-- The drag-to-resize handler -->