mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 17:24:00 +00:00
connection menu refactor
This commit is contained in:
@@ -261,6 +261,18 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
!data.singleDatabase && [
|
||||||
|
!$openedConnections.includes(data._id) && {
|
||||||
|
text: 'Connect',
|
||||||
|
onClick: handleConnect,
|
||||||
|
isBold: true,
|
||||||
|
},
|
||||||
|
$openedConnections.includes(data._id) && {
|
||||||
|
text: 'Disconnect',
|
||||||
|
onClick: handleDisconnect,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
{ divider: true },
|
||||||
config.runAsPortal == false &&
|
config.runAsPortal == false &&
|
||||||
!config.storageDatabase && [
|
!config.storageDatabase && [
|
||||||
{
|
{
|
||||||
@@ -276,21 +288,14 @@
|
|||||||
onClick: handleDuplicate,
|
onClick: handleDuplicate,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
{ divider: true },
|
||||||
!data.singleDatabase && [
|
!data.singleDatabase && [
|
||||||
!$openedConnections.includes(data._id) && {
|
|
||||||
text: 'Connect',
|
|
||||||
onClick: handleConnect,
|
|
||||||
},
|
|
||||||
hasPermission(`dbops/query`) && { onClick: handleNewQuery, text: 'New query', isNewQuery: true },
|
hasPermission(`dbops/query`) && { onClick: handleNewQuery, text: 'New query', isNewQuery: true },
|
||||||
$openedConnections.includes(data._id) &&
|
$openedConnections.includes(data._id) &&
|
||||||
data.status && {
|
data.status && {
|
||||||
text: 'Refresh',
|
text: 'Refresh',
|
||||||
onClick: handleRefresh,
|
onClick: handleRefresh,
|
||||||
},
|
},
|
||||||
$openedConnections.includes(data._id) && {
|
|
||||||
text: 'Disconnect',
|
|
||||||
onClick: handleDisconnect,
|
|
||||||
},
|
|
||||||
hasPermission(`dbops/createdb`) &&
|
hasPermission(`dbops/createdb`) &&
|
||||||
$openedConnections.includes(data._id) &&
|
$openedConnections.includes(data._id) &&
|
||||||
driver?.supportedCreateDatabase &&
|
driver?.supportedCreateDatabase &&
|
||||||
|
|||||||
Reference in New Issue
Block a user