-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* CB-5955 adds create menu (connection, folder) * CB-5955 hides folder creation for non authorized users * CB-5955 fixes label * CB-5955 disable new connection * CB-5955 shows create actions only for folders and connections nodes * CB-5955 cleanup * CB-5955 Add handler to hide create menu when no items are available * CB-5955 Refactor handler to directly bind elementsTreeActionHandler for folder creation * CB-5955 pr fixes * CB-5955 creates connection according to the selected in tree project + tree selection refactor * CB-5955 reverts old behavior with Generate SQL submenu for connections * CB-5955 cleanup * CB-5955 adds connection via menu into any folder * CB-5955 updates TS references * CB-5955 cleanup * CB-5955 pr fixes * CB-5955 pr fixes * CB-5955 pr fixes * CB-5955 cleanup * CB-5955 fixes bug with dissapeared create connection button at top bar * CB-5955 pr fixes --------- Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
- Loading branch information
1 parent
92c7cef
commit eada3fd
Showing
32 changed files
with
431 additions
and
212 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
webapp/packages/core-connections/src/NavTree/getFolderPath.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2024 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import { getFolderPathWithProjectId } from './getFolderPathWithProjectId.js'; | ||
|
||
export function getFolderPath(folderId: string): string { | ||
return getFolderPathWithProjectId(folderId).split('/').slice(1).join('/'); | ||
} |
16 changes: 16 additions & 0 deletions
16
webapp/packages/core-connections/src/NavTree/getFolderPathWithProjectId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2024 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import { isFolderNodeId } from './isFolderNodeId.js'; | ||
|
||
export function getFolderPathWithProjectId(folderId: string): string { | ||
if (!isFolderNodeId(folderId)) { | ||
throw new Error('Invalid folder id'); | ||
} | ||
|
||
return folderId.replace('folder://', ''); | ||
} |
14 changes: 14 additions & 0 deletions
14
webapp/packages/core-connections/src/NavTree/isConnectionNode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2024 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import type { NavNode } from '@cloudbeaver/core-navigation-tree'; | ||
|
||
import { NAV_NODE_TYPE_CONNECTION } from './NAV_NODE_TYPE_CONNECTION.js'; | ||
|
||
export function isConnectionNode(node: NavNode | undefined): boolean { | ||
return node?.nodeType === NAV_NODE_TYPE_CONNECTION; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
webapp/packages/core-navigation-tree/src/NodesManager/isConnectionFolder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2024 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import type { NavNode } from './EntityTypes.js'; | ||
import { NAV_NODE_TYPE_FOLDER } from './NAV_NODE_TYPE_FOLDER.js'; | ||
|
||
export function isConnectionFolder(node: NavNode | undefined): boolean { | ||
return node?.nodeType === NAV_NODE_TYPE_FOLDER; | ||
} |
14 changes: 14 additions & 0 deletions
14
webapp/packages/core-navigation-tree/src/NodesManager/isProjectNode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2024 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import { NAV_NODE_TYPE_PROJECT } from '@cloudbeaver/core-projects'; | ||
|
||
import type { NavNode } from './EntityTypes.js'; | ||
|
||
export function isProjectNode(node: NavNode | undefined): boolean { | ||
return node?.nodeType === NAV_NODE_TYPE_PROJECT; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.