fix(etcd): hide generic query sidebar actions

This commit is contained in:
二丫讲梵
2026-10-15 10:33:33 +08:00
committed by GitHub
parent adf1bb0be7
commit e64a7716fe
3 changed files with 4 additions and 4 deletions
@@ -7029,7 +7029,7 @@ function buildSpecialSidebarMenu(context: SidebarMenuFactoryContext): boolean {
return true;
}
if (node.type === "nacos-access-control" || node.type === "etcd-root" || node.type === "etcd-dashboard" || node.type === "etcd-access-control" || node.type === "zookeeper-root" || node.type === "consul-root" || node.type === "consul-overview") {
if (node.type === "nacos-access-control" || node.type === "zookeeper-root" || node.type === "consul-root" || node.type === "consul-overview") {
items.push({ label: t("contextMenu.openConnection"), action: toggle, icon: Database });
return true;
}
@@ -116,7 +116,7 @@ export function supportsClearableQuerySchema(dbType?: DatabaseType): boolean {
* ZooKeeper has no query surface: its agent implements only kv_* operations,
* so the sidebar "new query" flow would call list-databases and fail
* (issue #8215). It is excluded alongside the other specialized surfaces
* (nacos, consul, hbase) whose connection workbench replaces query tabs.
* (nacos, consul, hbase, etcd) whose connection workbench replaces query tabs.
*
* The message-queue surfaces (`mq` — Pulsar/Kafka/RocketMQ/RabbitMQ — and
* `mqtt`) belong to the same group: brokers have no SQL engine, and their
@@ -128,7 +128,7 @@ export function supportsClearableQuerySchema(dbType?: DatabaseType): boolean {
* hidden there as well (issue #9609).
*/
export function supportsConnectionQueryActions(dbType?: DatabaseType): boolean {
return dbType !== "nacos" && dbType !== "consul" && dbType !== "hbase" && dbType !== "zookeeper" && dbType !== "plugin" && dbType !== "mq" && dbType !== "mqtt" && dbType !== "meilisearch" && dbType !== "salesforce";
return dbType !== "nacos" && dbType !== "consul" && dbType !== "hbase" && dbType !== "etcd" && dbType !== "zookeeper" && dbType !== "plugin" && dbType !== "mq" && dbType !== "mqtt" && dbType !== "meilisearch" && dbType !== "salesforce";
}
/**
@@ -73,7 +73,7 @@ const queryOnActivationNodeTypes = new Set<TreeNodeType>(["connection", "databas
/**
* Whether activating this row should open (or focus) the connection's query
* page for the "open query on connection open" preference. Specialized
* workbench connections (nacos, consul, hbase, zookeeper, plugin, mq, mqtt,
* workbench connections (nacos, consul, hbase, etcd, zookeeper, plugin, mq, mqtt,
* meilisearch, salesforce) keep their dedicated surfaces instead — the same
* `supportsConnectionQueryActions` gate the context menu applies to its
* "New Query" entry.