Skip to content

Commit 1de7e16

Browse files
committed
Merge branch 'devel' of https://github.com/dbeaver/cloudbeaver into 6775-ai-function-calling-poc
2 parents 8cabbeb + 65876e9 commit 1de7e16

File tree

14 files changed

+92
-25
lines changed

14 files changed

+92
-25
lines changed

server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/cli/CloudBeaverInstanceServer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.jkiss.code.NotNull;
2121
import org.jkiss.dbeaver.model.cli.ApplicationInstanceController;
2222
import org.jkiss.dbeaver.model.cli.ApplicationInstanceServer;
23-
import org.jkiss.dbeaver.model.cli.CmdProcessResult;
23+
import org.jkiss.dbeaver.model.cli.CliProcessResult;
2424

2525
import java.io.IOException;
2626

@@ -31,7 +31,7 @@ public CloudBeaverInstanceServer() throws IOException {
3131

3232
@NotNull
3333
@Override
34-
public CmdProcessResult handleCommandLine(@NotNull String[] args) {
34+
public CliProcessResult handleCommandLine(@NotNull String[] args) {
3535
CommandLine cmd = CloudBeaverCommandLine.getInstance().getCommandLine(args);
3636
try {
3737
return CloudBeaverCommandLine.getInstance().executeCommandLineCommands(
@@ -40,7 +40,7 @@ public CmdProcessResult handleCommandLine(@NotNull String[] args) {
4040
false
4141
);
4242
} catch (Exception e) {
43-
return new CmdProcessResult(CmdProcessResult.PostAction.ERROR, "Error executing command: " + e.getMessage());
43+
return new CliProcessResult(CliProcessResult.PostAction.ERROR, "Error executing command: " + e.getMessage());
4444
}
4545
}
4646
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"arcanis.vscode-zipfs",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode"
6+
]
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"search.exclude": {
3+
"**/.yarn": true,
4+
"**/.pnp.*": true
5+
},
6+
"eslint.nodePath": "../.yarn/sdks",
7+
"prettier.prettierPath": "../.yarn/sdks/prettier/index.cjs",
8+
"typescript.tsdk": "../.yarn/sdks/typescript/lib",
9+
"typescript.enablePromptUseWorkspaceTsdk": true
10+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"arcanis.vscode-zipfs",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode"
6+
]
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"search.exclude": {
3+
"**/.yarn": true,
4+
"**/.pnp.*": true
5+
},
6+
"eslint.nodePath": "../.yarn/sdks",
7+
"prettier.prettierPath": "../.yarn/sdks/prettier/index.cjs",
8+
"typescript.tsdk": "../.yarn/sdks/typescript/lib",
9+
"typescript.enablePromptUseWorkspaceTsdk": true
10+
}

webapp/packages/plugin-connection-custom/src/CustomConnectionPluginBootstrap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ export class CustomConnectionPluginBootstrap extends Bootstrap {
5252
this.navigationTabsService.welcomeContainer.add(WelcomeNewConnection, undefined, () => this.isConnectionFeatureDisabled(true));
5353
this.menuService.addCreator({
5454
menus: [MENU_CONNECTIONS],
55-
getItems: (context, items) => [...items, ACTION_CONNECTION_CUSTOM],
55+
getItems: (context, items) => [ACTION_CONNECTION_CUSTOM, ...items],
5656
});
5757

5858
this.menuService.addCreator({
5959
menus: [MENU_TREE_CREATE_CONNECTION],
60-
getItems: (context, items) => [...items, ACTION_TREE_CREATE_CONNECTION],
60+
getItems: (context, items) => [ACTION_TREE_CREATE_CONNECTION, ...items],
6161
isApplicable: () => !this.isConnectionFeatureDisabled(true),
6262
});
6363

@@ -81,7 +81,7 @@ export class CustomConnectionPluginBootstrap extends Bootstrap {
8181

8282
return true;
8383
},
84-
getItems: (context, items) => [...items, ACTION_TREE_CREATE_CONNECTION],
84+
getItems: (context, items) => [ACTION_TREE_CREATE_CONNECTION, ...items],
8585
});
8686

8787
this.actionService.addHandler({

webapp/packages/plugin-connection-search/src/SearchConnectionPluginBootstrap.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Bootstrap, injectable } from '@cloudbeaver/core-di';
1010
import { ProjectInfoResource } from '@cloudbeaver/core-projects';
1111
import { CachedMapAllKey, getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource';
1212
import { EAdminPermission, PermissionsService } from '@cloudbeaver/core-root';
13-
import { ActionService, MenuService } from '@cloudbeaver/core-view';
13+
import { ActionService, menuExtractItems, MenuService } from '@cloudbeaver/core-view';
1414
import { MENU_CONNECTIONS, MENU_TREE_CREATE_CONNECTION } from '@cloudbeaver/plugin-connections';
1515

1616
import { ACTION_CONNECTION_SEARCH } from './Actions/ACTION_CONNECTION_SEARCH.js';
@@ -43,6 +43,13 @@ export class SearchConnectionPluginBootstrap extends Bootstrap {
4343
this.menuService.addCreator({
4444
menus: [MENU_CONNECTIONS, MENU_TREE_CREATE_CONNECTION],
4545
getItems: (context, items) => [...items, ACTION_CONNECTION_SEARCH],
46+
orderItems: (context, items) => {
47+
const actions = menuExtractItems(items, [ACTION_CONNECTION_SEARCH]);
48+
49+
items.push(...actions);
50+
51+
return items;
52+
},
4653
});
4754

4855
this.actionService.addHandler({

webapp/packages/plugin-connections/src/ConnectionForm/SSH/ConnectionSSHTabService.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Licensed under the Apache License, Version 2.0.
66
* you may not use this file except in compliance with the License.
77
*/
8-
import React from 'react';
98

109
import { DBDriverResource, SSH_TUNNEL_ID } from '@cloudbeaver/core-connections';
1110
import { Bootstrap, injectable } from '@cloudbeaver/core-di';
@@ -14,15 +13,10 @@ import { DriverConfigurationType } from '@cloudbeaver/core-sdk';
1413
import { ConnectionFormService } from '../ConnectionFormService.js';
1514
import { getConnectionFormOptionsPart } from '../Options/getConnectionFormOptionsPart.js';
1615
import { getCachedMapResourceLoaderState } from '@cloudbeaver/core-resource';
16+
import { importLazyComponent } from '@cloudbeaver/core-blocks';
1717

18-
const SSHTab = React.lazy(async () => {
19-
const { SSHTab } = await import('./SSHTab.js');
20-
return { default: SSHTab };
21-
});
22-
const SSHPanel = React.lazy(async () => {
23-
const { SSHPanel } = await import('./SSHPanel.js');
24-
return { default: SSHPanel };
25-
});
18+
const SSHTab = importLazyComponent(() => import('./SSHTab.js').then(m => m.SSHTab));
19+
const SSHPanel = importLazyComponent(() => import('./SSHPanel.js').then(m => m.SSHPanel));
2620

2721
@injectable(() => [DBDriverResource, ConnectionFormService])
2822
export class ConnectionSSHTabService extends Bootstrap {
@@ -37,7 +31,7 @@ export class ConnectionSSHTabService extends Bootstrap {
3731
this.connectionFormService.parts.add({
3832
key: 'ssh',
3933
name: 'plugin_connections_connection_form_part_main',
40-
order: 3,
34+
order: 2.5,
4135
tab: () => SSHTab,
4236
panel: () => SSHPanel,
4337
getLoader: (_, props) => {

webapp/packages/plugin-datasource-transaction-manager/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"@cloudbeaver/plugin-data-grid": "workspace:*",
4040
"@cloudbeaver/plugin-datasource-context-switch": "workspace:*",
4141
"@cloudbeaver/plugin-sql-editor-new": "workspace:*",
42+
"@cloudbeaver/plugin-tools-panel": "workspace:*",
4243
"@cloudbeaver/plugin-top-app-bar": "workspace:*",
4344
"@dbeaver/js-helpers": "workspace:^",
4445
"mobx": "^6",

webapp/packages/plugin-datasource-transaction-manager/src/TransactionManagerBootstrap.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import { ExecutorInterrupter, type IExecutionContextProvider } from '@cloudbeave
2424
import { LocalizationService } from '@cloudbeaver/core-localization';
2525
import { OptionsPanelService } from '@cloudbeaver/core-ui';
2626
import { isNotNullDefined } from '@dbeaver/js-helpers';
27-
import { ActionService, MenuCustomItem, MenuService } from '@cloudbeaver/core-view';
27+
import { ActionService, MenuCustomItem, menuExtractItems, MenuService } from '@cloudbeaver/core-view';
2828
import { ConnectionSchemaManagerService } from '@cloudbeaver/plugin-datasource-context-switch';
2929
import { MENU_APP_ACTIONS } from '@cloudbeaver/plugin-top-app-bar';
30+
import { MENU_TOOLS } from '@cloudbeaver/plugin-tools-panel';
3031

3132
import { ACTION_DATASOURCE_TRANSACTION_COMMIT } from './actions/ACTION_DATASOURCE_TRANSACTION_COMMIT.js';
3233
import { ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE } from './actions/ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE.js';
@@ -125,6 +126,26 @@ export class TransactionManagerBootstrap extends Bootstrap {
125126

126127
return result;
127128
},
129+
orderItems: (context, items) => {
130+
const actions = menuExtractItems(items, [
131+
ACTION_DATASOURCE_TRANSACTION_COMMIT,
132+
ACTION_DATASOURCE_TRANSACTION_ROLLBACK,
133+
ACTION_DATASOURCE_TRANSACTION_COMMIT_MODE_TOGGLE,
134+
]);
135+
136+
const infoElementIndex = items.findIndex(item => item.id === 'transaction-info');
137+
138+
if (infoElementIndex !== -1) {
139+
actions.push(...items.splice(infoElementIndex, 1));
140+
}
141+
142+
if (actions.length > 0) {
143+
const toolsItem = items.indexOf(MENU_TOOLS);
144+
items.splice(toolsItem === -1 ? items.length : toolsItem + 1, 0, ...actions);
145+
}
146+
147+
return items;
148+
},
128149
});
129150

130151
this.actionService.addHandler({

0 commit comments

Comments
 (0)