From f818fb1c85aa046c27a285f8f49ddcea6cd232cc Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Tue, 18 Nov 2025 12:36:40 +0100 Subject: [PATCH] [CB] TE too many requests navNodeInfo (connection edit) which freezes interface (#3894) * dbeaver/pro#7480 fix: preloads only connection info by key (not all) to prevent connectioInfoResource loading of all data and all following handlers actions * adds console error and return empty array for origin info loader * warning instead of error --- .../OriginInfo/ConnectionOriginInfoTabService.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts index f92b1e8a24..bc655ae16f 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/OriginInfo/ConnectionOriginInfoTabService.ts @@ -11,7 +11,7 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { ConnectionFormService } from '../ConnectionFormService.js'; import { importLazyComponent } from '@cloudbeaver/core-blocks'; -import { CachedMapAllKey, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; +import { getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource'; import { getConnectionFormOptionsPart } from '../Options/getConnectionFormOptionsPart.js'; export const ConnectionFormAuthenticationAction = importLazyComponent(() => import('./ConnectionFormAuthenticationAction.js').then(m => m.ConnectionFormAuthenticationAction), @@ -35,7 +35,17 @@ export class ConnectionOriginInfoTabService extends Bootstrap { order: 3, tab: () => OriginInfoTab, panel: () => OriginInfo, - getLoader: () => getCachedMapResourceLoaderState(this.connectionInfoOriginResource, () => CachedMapAllKey), + getLoader: (context, props) => { + const optionsPart = props?.formState ? getConnectionFormOptionsPart(props.formState) : null; + const key = optionsPart?.connectionKey; + + if (!key) { + console.warn('Cannot load connection origin info: connection key is not defined'); + return []; + } + + return getCachedMapResourceLoaderState(this.connectionInfoOriginResource, () => key); + }, isHidden: (tabId, props) => { const optionsPart = props?.formState ? getConnectionFormOptionsPart(props.formState) : null; const key = optionsPart?.connectionKey;