diff --git a/apps/desktop/src/components/sidebar/TreeItem.vue b/apps/desktop/src/components/sidebar/TreeItem.vue index 4f327d8f5e..e4d1a3596f 100644 --- a/apps/desktop/src/components/sidebar/TreeItem.vue +++ b/apps/desktop/src/components/sidebar/TreeItem.vue @@ -90,6 +90,7 @@ import { focusSidebarRenameInput } from "@/lib/sidebar/sidebarRenameFocus"; import { ensureSqlExtension, stripSqlExtension } from "@/lib/savedSql/savedSqlFileName"; import { savedSqlErrorMessage } from "@/lib/savedSql/savedSqlErrors"; import { useSavedSqlStore } from "@/stores/savedSqlStore"; +import { elasticsearchIndexAliasLabel } from "@/lib/sidebar/elasticsearchIndexActions"; import { isXuguPublicSynonymTreeNode, isXuguSchedulerJobTreeNode, xuguSchemaDisplayName } from "@/lib/sidebar/xuguPublicSynonyms"; import { xuguDatafileDetailRows, xuguTablespaceDetailRows } from "@/lib/sidebar/xuguTablespaces"; // --- Drag and Drop --- @@ -442,6 +443,7 @@ function treeNodeSecondaryValue(node: TreeNode): string | undefined { if (node.type === "type" && node.customTypeKind) return t(`customType.kinds.${node.customTypeKind}`); if (node.type === "type-member") return (node.meta as CustomTypeTreeMemberMeta | undefined)?.displayValue; if (node.type === "datafile") return node.xuguDatafilePath; + if (node.type === "elasticsearch-index") return elasticsearchIndexAliasLabel(node); return undefined; } @@ -604,6 +606,16 @@ const detailTooltip = computed(() => { })); return rows.length ? { rows } : null; } + if (node.type === "elasticsearch-index") { + const aliases = elasticsearchIndexAliasLabel(node); + if (!aliases) return null; + return { + rows: [ + { label: t("objects.name"), value: visibleLabel(node) }, + { label: t("tree.elasticsearchAlias"), value: aliases }, + ], + }; + } const comment = node.type === "column" && node.meta && "comment" in node.meta ? (node.meta as ColumnInfo).comment : node.comment; if (!comment || (node.type !== "schema" && node.type !== "table" && node.type !== "view" && node.type !== "column")) return null; const rows: DetailTooltipRow[] = [ @@ -1567,7 +1579,10 @@ function onKeydown(event: KeyboardEvent) { ]" >{{ visibleLabel(node) }} - {{ treeNodeSecondaryValue(node) }} + + + {{ treeNodeSecondaryValue(node) }} +