Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore(sql-editor): adjust indents and icons (#11681)
Liu Ji621717f64140
diff --git a/frontend/src/components/Icon/TablePartitionIcon.vue b/frontend/src/components/Icon/TablePartitionIcon.vueindex e87aebecdd..cb88e9b483 100644--- a/frontend/src/components/Icon/TablePartitionIcon.vue+++ b/frontend/src/components/Icon/TablePartitionIcon.vue@@ -1,5 +1,5 @@<template>- <TableRowsSplitIcon />+ <TableRowsSplitIcon class="opacity-75" :stroke-width="1.75" /></template><script setup lang="ts">diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 87975b5fa4..8a0c5f8bf0 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1252,7 +1252,8 @@"failed-to-sync-schema": "Failed to sync schema","successfully-synced-schema": "Successfully synced schema","create": "Create database",- "procedures": "Procedures"+ "procedures": "Procedures",+ "partitions": "Partitions"},"instance": {"select": "Select instance",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 0d688265c2..580485d4d4 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1252,7 +1252,8 @@"failed-to-sync-schema": "No se pudo sincronizar el esquema","successfully-synced-schema": "Esquema sincronizado correctamente","create": "Crear base de datos",- "procedures": "Trámites"+ "procedures": "Trámites",+ "partitions": "Particiones"},"instance": {"select": "Seleccionar instancia",@@ -3421,4 +3422,4 @@"drop-partition-with-subpartitions-confirm": "También eliminará todas sus subparticiones."}}-}\ No newline at end of file+}diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 96d7475fda..f95b11e887 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1252,7 +1252,8 @@"failed-to-sync-schema": "スキーマを正常に同期しました","successfully-synced-schema": "インスタンスを選択してください","create": "データベースの作成",- "procedures": "手順"+ "procedures": "手順",+ "partitions": "パーティション"},"instance": {"select": "データベースユーザーを選択してください",@@ -3421,4 +3422,4 @@"drop-partition-with-subpartitions-confirm": "また、そのサブパーティションもすべて削除されます。"}}-}\ No newline at end of file+}diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex d8255fd0be..5ab46c8dc8 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1252,7 +1252,8 @@"failed-to-sync-schema": "Không thể đồng bộ hóa lược đồ","successfully-synced-schema": "Đã đồng bộ hóa lược đồ thành công","create": "Tạo nên cơ sở dữ liệu",- "procedures": "Thủ tục"+ "procedures": "Thủ tục",+ "partitions": "Phân vùng"},"instance": {"select": "Chọn phiên bản",@@ -3421,4 +3422,4 @@"drop-partition-with-subpartitions-confirm": "Cũng sẽ bỏ tất cả các phân vùng của nó."}}-}\ No newline at end of file+}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 9ff55f55c4..cbf17ef924 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1252,7 +1252,8 @@"failed-to-sync-schema": "同步 schema 失败","successfully-synced-schema": "Schema 同步完成","create": "创建数据库",- "procedures": "存储过程"+ "procedures": "存储过程",+ "partitions": "分区"},"instance": {"select": "选择实例",@@ -3421,4 +3422,4 @@"drop-partition-with-subpartitions-confirm": "将会同时删除其所有子分区。"}}-}\ No newline at end of file+}diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/SchemaPane.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/SchemaPane.vueindex 497bdc1c4e..ee79d5a9a3 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/SchemaPane.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/SchemaPane.vue@@ -280,10 +280,15 @@ watch(tree, () => {padding: 0;}.schema-tree :deep(.n-tree-node-indent) {- width: 1rem;+ width: 20px;+}+.schema-tree :deep(.n-tree-node-switcher) {+ width: 20px !important;+ height: 20px !important;+ align-self: center;}.schema-tree :deep(.n-tree-node-switcher--hide) {- width: 0.5rem !important;+ width: 0 !important;}.schema-tree :deep(.n-tree-node-content__prefix) {@apply shrink-0 !mr-1;diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/ColumnNode.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/ColumnNode.vueindex 211908bd5a..e0e0b8944e 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/ColumnNode.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/ColumnNode.vue@@ -1,8 +1,9 @@<template><div class="flex items-center max-w-full overflow-hidden gap-x-1">- <PrimaryKeyIcon v-if="isPrimaryKey" class="w-4 h-4" />- <IndexIcon v-else-if="isIndex" class="!w-4 !h-4 text-gray-500" />- <div v-else class="w-4 h-4" />+ <div class="w-4 h-4 inline-flex items-center justify-center">+ <PrimaryKeyIcon v-if="isPrimaryKey" class="w-4 h-4" />+ <IndexIcon v-else-if="isIndex" class="!w-4 !h-4 text-gray-500" />+ </div><HighlightLabelText:text="target.column.name":keyword="keyword"diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/PartitionTableNode.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/PartitionTableNode.vueindex 5df883f134..883784875e 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/PartitionTableNode.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/PartitionTableNode.vue@@ -1,6 +1,6 @@<template><div class="flex items-center max-w-full overflow-hidden gap-x-1">- <TablePartitionIcon class="w-4 h-4 opacity-75" :stroke-width="1.75" />+ <TablePartitionIcon class="w-4 h-4" /><HighlightLabelText:text="target.partition.name":keyword="keyword"diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/TextNode.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/TextNode.vueindex 93c15471c0..c8f98cba44 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/TextNode.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/TextNode.vue@@ -8,7 +8,12 @@class="w-4"/><ViewIcon v-if="type === 'view'" class="w-4 h-4" />+ <ProcedureIcon v-if="type === 'procedure'" class="w-4 h-4" />+ <FunctionIcon v-if="type === 'function'" class="w-4 h-4" />+ <TablePartitionIcon v-if="type === 'partition-table'" class="w-4 h-4" />+<component :is="render" v-if="render" />+<span v-else>{{ text }}</span></div></template>@@ -16,7 +21,13 @@<script setup lang="ts">import { isFunction } from "lodash-es";import { computed } from "vue";-import { TableIcon, ViewIcon } from "@/components/Icon";+import {+ FunctionIcon,+ ProcedureIcon,+ TableIcon,+ TablePartitionIcon,+ ViewIcon,+} from "@/components/Icon";import type { TreeNode } from "../common";const props = defineProps<{diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/common.ts b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/common.tsindex 4fe6447fb1..0ca2d24499 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/common.ts+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/common.ts@@ -334,6 +334,12 @@ const mapTableNodes = (target: NodeTarget<"schema">, parent: TreeNode) => {// Map table-level partitions.if (table.partitions.length > 0) {+ const partitionTableTextNode = createExpandableTextNode(+ "partition-table",+ node,+ () => t("db.partitions")+ );+ partitionTableTextNode.children = [];for (const partition of table.partitions) {const subnode = mapTreeNodeByType("partition-table",@@ -346,8 +352,9 @@ const mapTableNodes = (target: NodeTarget<"schema">, parent: TreeNode) => {} else {subnode.isLeaf = true;}- node.children.push(subnode);+ partitionTableTextNode.children?.push(subnode);}+ node.children?.push(partitionTableTextNode);}return node;});