From fd5b6ec93cdd913c3d01348663b28461f167df92 Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Fri, 24 May 2024 14:14:31 +0200 Subject: [PATCH] Revert "CB-4584 fix: object property table reloads pages after connection being disconnected" This reverts commit 46f28dc045dbf09fbd80c1e38d8647bfb3fcf042. --- .../src/NavTree/ConnectionNavNodeService.ts | 10 ++-------- .../ObjectPropertyTable/ObjectPropertyTable.tsx | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts b/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts index c81902ff1b..9786cc9570 100644 --- a/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts +++ b/webapp/packages/core-connections/src/NavTree/ConnectionNavNodeService.ts @@ -8,7 +8,7 @@ import { action, makeObservable } from 'mobx'; import { Dependency, injectable } from '@cloudbeaver/core-di'; -import { ExecutorInterrupter, IAsyncContextLoader, IExecutionContextProvider, IExecutorHandler } from '@cloudbeaver/core-executor'; +import { ExecutorInterrupter, IAsyncContextLoader, IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { INodeNavigationData, NavNodeInfoResource, @@ -23,7 +23,7 @@ import { ServerEventId } from '@cloudbeaver/core-root'; import type { IConnectionInfoParams } from '../CONNECTION_INFO_PARAM_SCHEMA'; import { ConnectionFolderEventHandler, IConnectionFolderEvent } from '../ConnectionFolderEventHandler'; import { Connection, ConnectionInfoActiveProjectKey, ConnectionInfoResource, createConnectionParam } from '../ConnectionInfoResource'; -import { ConnectionsManagerService, IConnectionExecutorData } from '../ConnectionsManagerService'; +import { ConnectionsManagerService } from '../ConnectionsManagerService'; import { ContainerResource } from '../ContainerResource'; import { getConnectionParentId } from './getConnectionParentId'; import { getFolderNodeParents } from './getFolderNodeParents'; @@ -57,8 +57,6 @@ export class ConnectionNavNodeService extends Dependency { this.navNodeManagerService.navigator.addHandler(this.navigateHandler.bind(this)); - this.connectionsManagerService.onDisconnect.addHandler(this.onDisconnectHandle.bind(this)); - this.connectionInfoResource.connect(this.navTreeResource); this.connectionFolderEventHandler.onEvent( @@ -101,10 +99,6 @@ export class ConnectionNavNodeService extends Dependency { ); } - onDisconnectHandle: IExecutorHandler = async (data, contexts) => { - this.navTreeResource.markOutdated(resourceKeyList(data.connections.map(connection => connection.connectionId))); - }; - navigationNavNodeConnectionContext: IAsyncContextLoader = async (context, { nodeId }) => { await this.connectionInfoResource.load(ConnectionInfoActiveProjectKey); const connection = this.connectionInfoResource.getConnectionForNode(nodeId); diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx index 8523bdc955..02c594797a 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/ObjectPropertyTable.tsx @@ -45,7 +45,7 @@ export const ObjectPropertyTable = observer(function O return ( <> - {objects.length === 0 ? ( + {nodes.length === 0 ? ( {translate('plugin_object_viewer_table_no_items')} ) : (