refactor(grid): extract column formatter workflow
This commit is contained in:
4 files changed
+685
-553
No files matched your search
@@ -4747,13 +4747,8 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
|
||||
async function loadMqTenants(connectionId: string, options?: LoadTreeOptions) {
|
||||
const node = findConnectionNode(connectionId);
|
||||
if (!node) return;
|
||||
|
||||
let load = beginTreeNodeLoad(node);
|
||||
try {
|
||||
await ensureConnected(connectionId);
|
||||
load = reclaimTreeNodeLoad(load, node);
|
||||
if (useCachedChildren(node, options, load)) return;
|
||||
return runConnectionTreeMetadataLoad(connectionId, node, async (load) => {
|
||||
if (useCachedChildren(node!, options, load)) return;
|
||||
|
||||
const config = getConfig(connectionId);
|
||||
if (isFlatMqConnection(config)) {
|
||||
@@ -4791,23 +4786,13 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
}
|
||||
const liveNode = treeNodeLoadTarget(load);
|
||||
if (liveNode) liveNode.isExpanded = true;
|
||||
} catch (e) {
|
||||
recordMetadataLoadError(connectionId, e, load);
|
||||
throw e;
|
||||
} finally {
|
||||
finishTreeNodeLoad(load);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function loadNacosNamespaces(connectionId: string, options?: LoadTreeOptions) {
|
||||
const node = findConnectionNode(connectionId);
|
||||
if (!node) return;
|
||||
|
||||
let load = beginTreeNodeLoad(node);
|
||||
try {
|
||||
await ensureConnected(connectionId);
|
||||
load = reclaimTreeNodeLoad(load, node);
|
||||
if (useCachedChildren(node, options, load)) return;
|
||||
return runConnectionTreeMetadataLoad(connectionId, node, async (load) => {
|
||||
if (useCachedChildren(node!, options, load)) return;
|
||||
|
||||
const sidebarSnapshot = await api.nacosSidebarSnapshot(connectionId);
|
||||
const namespaces = normalizeNacosNamespacesForDisplay(sidebarSnapshot.namespaces);
|
||||
@@ -4852,12 +4837,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
}
|
||||
setChildren(targetNode, children);
|
||||
targetNode.isExpanded = true;
|
||||
} catch (e) {
|
||||
recordMetadataLoadError(connectionId, e, load);
|
||||
throw e;
|
||||
} finally {
|
||||
finishTreeNodeLoad(load);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateRedisDbKeyStats(connectionId: string, db: number, stats: { loaded?: number; total?: number; totalDelta?: number }) {
|
||||
|
||||
Reference in new issue
Block a user