feat(etcd): add agent-backed etcd support
This commit is contained in:
1 parent
7bd8d29a79
commit
e6062b2b07
49 files changed
+1524
-15
No files matched your search
@@ -15,6 +15,10 @@ export type ActiveTabSidebarTarget =
|
||||
database: string;
|
||||
collectionName: string;
|
||||
}
|
||||
| {
|
||||
type: "etcd-root";
|
||||
connectionId: string;
|
||||
}
|
||||
| {
|
||||
type: "saved-sql-file";
|
||||
savedSqlId: string;
|
||||
@@ -56,6 +60,10 @@ export function activeTabSidebarTarget(tab: QueryTab | undefined | null): Active
|
||||
};
|
||||
}
|
||||
|
||||
if (tab.mode === "etcd") {
|
||||
return { type: "etcd-root", connectionId: tab.connectionId };
|
||||
}
|
||||
|
||||
if (tab.mode === "query") {
|
||||
if (!tab.connectionId || !tab.database) return null;
|
||||
return {
|
||||
@@ -100,6 +108,10 @@ export function matchesTarget(node: TreeNode, target: ActiveTabSidebarTarget): b
|
||||
return node.type === "database" && node.connectionId === target.connectionId && node.label === target.database;
|
||||
}
|
||||
|
||||
if (target.type === "etcd-root") {
|
||||
return node.type === "etcd-root" && node.connectionId === target.connectionId;
|
||||
}
|
||||
|
||||
return (
|
||||
(node.type === "table" || node.type === "view") &&
|
||||
node.connectionId === target.connectionId &&
|
||||
|
||||
Reference in new issue
Block a user