mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-3300 feat: dataset editing (#1614)
* CB-3300 feat: dataset editing * CB-3300 chore: remove unused styles --------- Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
This commit is contained in:
@@ -19,7 +19,7 @@ import { ActionService, ACTION_SAVE, DATA_CONTEXT_MENU, MenuService } from '@clo
|
||||
import { NavigationTabsService } from '@cloudbeaver/plugin-navigation-tabs';
|
||||
import { NavResourceNodeService, ResourceManagerService, getResourceKeyFromNodeId } from '@cloudbeaver/plugin-resource-manager';
|
||||
import { ResourceManagerScriptsService, SaveScriptDialog, SCRIPTS_TYPE_ID } from '@cloudbeaver/plugin-resource-manager-scripts';
|
||||
import { DATA_CONTEXT_SQL_EDITOR_STATE, ESqlDataSourceFeatures, getSqlEditorName, ISqlDataSource, SqlDataSourceService, SqlEditorSettingsService, SQL_EDITOR_ACTIONS_MENU } from '@cloudbeaver/plugin-sql-editor';
|
||||
import { DATA_CONTEXT_SQL_EDITOR_STATE, ESqlDataSourceFeatures, getSqlEditorName, ISqlDataSource, SqlDataSourceService, SqlEditorSettingsService, MemorySqlDataSource, LocalStorageSqlDataSource, SQL_EDITOR_TOOLS_MENU } from '@cloudbeaver/plugin-sql-editor';
|
||||
import { isSQLEditorTab, SqlEditorNavigatorService } from '@cloudbeaver/plugin-sql-editor-navigation-tab';
|
||||
|
||||
import { ResourceSqlDataSource } from './ResourceSqlDataSource';
|
||||
@@ -66,7 +66,12 @@ export class PluginBootstrap extends Bootstrap {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !(this.sqlDataSourceService.get(state.editorId) instanceof ResourceSqlDataSource);
|
||||
const dataSource = this.sqlDataSourceService.get(state.editorId);
|
||||
|
||||
return (
|
||||
dataSource instanceof MemorySqlDataSource
|
||||
|| dataSource instanceof LocalStorageSqlDataSource
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -182,7 +187,7 @@ export class PluginBootstrap extends Bootstrap {
|
||||
|
||||
return (
|
||||
this.resourceManagerService.enabled
|
||||
&& context.get(DATA_CONTEXT_MENU) === SQL_EDITOR_ACTIONS_MENU
|
||||
&& context.get(DATA_CONTEXT_MENU) === SQL_EDITOR_TOOLS_MENU
|
||||
&& !!dataSource?.hasFeature(ESqlDataSourceFeatures.script)
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user