feat(meilisearch): add workspace, key, and task management

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-23 02:53:52 +08:00
1 parent 93dc455c72
commit e55ee6054d
48 files changed
+3984 -18

No files matched your search

@@ -64,6 +64,10 @@ export type ActiveTabSidebarTarget =
type: "consul-overview";
connectionId: string;
}
| {
type: "meilisearch-system";
connectionId: string;
}
| {
type: "mq-tenant";
connectionId: string;
@@ -143,6 +147,10 @@ export function activeTabSidebarTarget(tab: QueryTab | undefined | null): Active
};
}
if (tab.mode === "meilisearch-system") {
return { type: "meilisearch-system", connectionId: tab.connectionId };
}
if (tab.mode === "mongo-bucket") {
return {
type: "mongo-gridfs",
@@ -255,6 +263,10 @@ export function matchesTarget(node: TreeNode, target: ActiveTabSidebarTarget): b
return node.type === "mongo-collection" && node.connectionId === target.connectionId && node.database === target.database && node.label === target.collectionName;
}
if (target.type === "meilisearch-system") {
return node.type === "meilisearch-system" && node.connectionId === target.connectionId;
}
if (target.type === "mongo-gridfs") {
return node.type === "mongo-gridfs" && node.connectionId === target.connectionId && node.database === target.database;
}
@@ -41,7 +41,9 @@ export function sortSidebarTreeChildrenForParent(parent: Pick<TreeNode, "type">,
const withConnectionUtilityOrder = (children: TreeNode[]) => [...savedSqlNodes, ...children, ...userAdminNodes];
if (databaseType === "mongodb" || databaseType === "elasticsearch" || databaseType === "easysearch" || databaseType === "meilisearch" || databaseType === "qdrant" || databaseType === "milvus" || databaseType === "weaviate" || databaseType === "chromadb") {
return withConnectionUtilityOrder(sortByLabel(regularChildren));
const meilisearchSystem = regularChildren.filter((child) => child.type === "meilisearch-system");
const databaseObjects = regularChildren.filter((child) => child.type !== "meilisearch-system");
return withConnectionUtilityOrder([...sortByLabel(databaseObjects), ...meilisearchSystem]);
}
if (databaseType === "duckdb") {
@@ -30,6 +30,7 @@ const leafTypes: Set<TreeNodeType> = new Set([
"dynamodb-table",
"vector-collection",
"elasticsearch-index",
"meilisearch-system",
"user-admin",
"dameng-users",
"dameng-roles",
@@ -27,6 +27,7 @@ const toggleLeafNodeTypes = new Set<TreeNodeType>([
"dynamodb-table",
"vector-collection",
"elasticsearch-index",
"meilisearch-system",
"user-admin",
"dameng-users",
"dameng-roles",
@@ -34,7 +35,7 @@ const toggleLeafNodeTypes = new Set<TreeNodeType>([
// These are application entry points rather than database objects. They should
// always navigate on a single click, even when the user prefers double-click
// activation for ordinary tree objects.
const directNavigationTreeNodeTypes = new Set<TreeNodeType>(["consul-root", "consul-overview", "nacos-namespace", "nacos-access-control"]);
const directNavigationTreeNodeTypes = new Set<TreeNodeType>(["consul-root", "consul-overview", "nacos-namespace", "nacos-access-control", "meilisearch-system"]);
const repeatableNavigationTreeNodeTypes = new Set<TreeNodeType>(["nacos-namespace", "nacos-access-control"]);
export function isDirectNavigationTreeNode(type: TreeNodeType): boolean {
@@ -102,6 +102,8 @@ export function getTreeNodeIconInfo(node: TreeNode): TreeNodeIconInfo | null {
return { icon: TableProperties, colorClass: "text-cyan-400" };
case "elasticsearch-index":
return { icon: Table, colorClass: "text-emerald-400" };
case "meilisearch-system":
return { icon: Gauge, colorClass: "text-emerald-500" };
case "procedure":
return { icon: ScrollText, colorClass: "text-blue-500" };
case "function":