feat(elasticsearch): add custom checks and tabular REST results
This commit is contained in:
1 parent
e2b35944ce
commit
a49137ae8b
44 files changed
+917
-74
No files matched your search
@@ -2324,6 +2324,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
} else if (config.db_type === "mongodb") {
|
||||
await loadMongoDatabases(connectionId);
|
||||
} else if (config.db_type === "elasticsearch") {
|
||||
// Reload: list indices.
|
||||
await loadElasticsearchIndices(connectionId);
|
||||
} else if (config.db_type === "milvus") {
|
||||
await loadMilvusDatabases(connectionId);
|
||||
@@ -3109,6 +3110,25 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect an Elasticsearch root without expanding or listing indices.
|
||||
* Used when first opening a connection (test/connect) — connectivity uses
|
||||
* GET / or the configured check path via ensureConnected/test_connection.
|
||||
* Expanding the node lists indices via loadElasticsearchIndices.
|
||||
*/
|
||||
async function openElasticsearchConnectionTree(connectionId: string) {
|
||||
const node = findConnectionNode(connectionId);
|
||||
if (!node) return;
|
||||
|
||||
// Only ensure connectivity (GET / or configured path); do not expand or list indices.
|
||||
try {
|
||||
await ensureConnected(connectionId);
|
||||
} catch (e) {
|
||||
recordMetadataLoadError(connectionId, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
async function loadElasticsearchIndices(connectionId: string) {
|
||||
const node = findConnectionNode(connectionId);
|
||||
if (!node) return;
|
||||
@@ -6168,6 +6188,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
updateRedisDbKeyStats,
|
||||
loadMongoDatabases,
|
||||
loadMilvusDatabases,
|
||||
openElasticsearchConnectionTree,
|
||||
loadElasticsearchIndices,
|
||||
loadVectorCollections,
|
||||
loadMongoCollections,
|
||||
|
||||
Reference in new issue
Block a user