From e6964e2dd48d07bd5d807d78772ea6ea57533549 Mon Sep 17 00:00:00 2001 From: Naumov Alexey Date: Wed, 18 May 2022 18:20:26 +0200 Subject: [PATCH] fix(plugin-resource-manager): CB-1926 revert loader --- .../src/SqlEditorTabResourceService.ts | 4 ---- .../src/ISqlEditorTabState.ts | 7 ------ .../SQLCodeEditorPanel/SQLCodeEditorPanel.tsx | 22 ++++++++----------- .../plugin-sql-editor/src/SqlEditorService.ts | 7 ------ 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/SqlEditorTabResourceService.ts b/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/SqlEditorTabResourceService.ts index 30f162da23..3c6a1d55dc 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/SqlEditorTabResourceService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/SqlEditorTabResourceService.ts @@ -205,8 +205,6 @@ export class SqlEditorTabResourceService { } try { - this.sqlEditorService.setProcess({ processing: true, label: 'ui_processing_synchronization' }, tab.handlerState); - const found = await this.navTreeResource.preloadNodeParents(state.parents, state.nodeId); if (!found) { @@ -218,8 +216,6 @@ export class SqlEditorTabResourceService { this.sqlEditorService.setQuery(query, tab.handlerState); } catch (exception) { this.notificationService.logException(exception as any, 'plugin_resource_manager_sync_script_error'); - } finally { - this.sqlEditorService.setProcess(null, tab.handlerState); } } } \ No newline at end of file diff --git a/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts b/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts index d0e88ead3e..2a85f4cf5b 100644 --- a/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts +++ b/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts @@ -7,12 +7,6 @@ */ import type { IConnectionExecutionContextInfo } from '@cloudbeaver/core-connections'; -import type { TLocalizationToken } from '@cloudbeaver/core-localization'; - -export interface ISqlEditorProcess { - processing: boolean; - label?: TLocalizationToken; -} export interface IResultTab { tabId: string; @@ -55,7 +49,6 @@ export interface ISqlEditorTabState { order: number; query: string; executionContext?: IConnectionExecutionContextInfo; - process: ISqlEditorProcess | null; currentTabId?: string; tabs: ISqlEditorResultTab[]; resultGroups: IResultGroup[]; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx index 23728e3e73..5594ba7491 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SQLCodeEditorPanel/SQLCodeEditorPanel.tsx @@ -11,7 +11,6 @@ import { useEffect, useState } from 'react'; import styled, { css } from 'reshadow'; import { DATA_CONTEXT_NAV_NODE, DATA_CONTEXT_NAV_NODES, NavNode, NavNodeManagerService } from '@cloudbeaver/core-app'; -import { Loader } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { TabContainerPanelComponent, useDNDBox } from '@cloudbeaver/core-ui'; @@ -36,7 +35,6 @@ const styles = css` `; export const SQLCodeEditorPanel: TabContainerPanelComponent = observer(function SQLCodeEditorPanel({ - state, data, }) { const notificationService = useService(NotificationService); @@ -99,16 +97,14 @@ export const SQLCodeEditorPanel: TabContainerPanelComponent }, [sqlCodeEditorController]); return styled(styles)( - - - - - + + + ); }); \ No newline at end of file diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts index 5e5d56baf4..30ab9286f5 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts @@ -13,8 +13,6 @@ import { Executor } from '@cloudbeaver/core-executor'; import { GraphQLService, SqlCompletionProposal, SqlScriptInfoFragment } from '@cloudbeaver/core-sdk'; import type { ISqlEditorTabState } from '@cloudbeaver/plugin-sql-editor'; -import type { ISqlEditorProcess } from './ISqlEditorTabState'; - export type SQLProposal = SqlCompletionProposal; export interface IQueryChangeData { @@ -55,7 +53,6 @@ export class SqlEditorService { resultTabs: [], executionPlanTabs: [], statisticsTabs: [], - process: null, currentModeId: '', modeState: [], }; @@ -111,10 +108,6 @@ export class SqlEditorService { state.name = name; } - setProcess(process: ISqlEditorProcess | null, state: ISqlEditorTabState) { - state.process = process; - } - setQuery(query: string, state: ISqlEditorTabState) { const prevQuery = state.query;