Skip to content

Commit

Permalink
Revert "CB-4584 fix: object property table reloads pages after connec…
Browse files Browse the repository at this point in the history
…tion being disconnected"

This reverts commit 46f28dc.
  • Loading branch information
sergeyteleshev committed May 24, 2024
1 parent 46f28dc commit fd5b6ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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';
Expand Down Expand Up @@ -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<IConnectionFolderEvent>(
Expand Down Expand Up @@ -101,10 +99,6 @@ export class ConnectionNavNodeService extends Dependency {
);
}

onDisconnectHandle: IExecutorHandler<IConnectionExecutorData, any> = async (data, contexts) => {
this.navTreeResource.markOutdated(resourceKeyList(data.connections.map(connection => connection.connectionId)));
};

navigationNavNodeConnectionContext: IAsyncContextLoader<Connection | undefined, INodeNavigationData> = async (context, { nodeId }) => {
await this.connectionInfoResource.load(ConnectionInfoActiveProjectKey);
const connection = this.connectionInfoResource.getConnectionForNode(nodeId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const ObjectPropertyTable = observer<ObjectPropertyTableProps>(function O

return (
<>
{objects.length === 0 ? (
{nodes.length === 0 ? (
<TextPlaceholder>{translate('plugin_object_viewer_table_no_items')}</TextPlaceholder>
) : (
<div className={s(styles, { box: true }, className)}>
Expand Down

0 comments on commit fd5b6ec

Please sign in to comment.