mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 15:36:28 +00:00
duplicate connection command
This commit is contained in:
@@ -19,6 +19,13 @@
|
|||||||
onConfirm: () => axiosInstance.post('connections/delete', data),
|
onConfirm: () => axiosInstance.post('connections/delete', data),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const handleDuplicate = () => {
|
||||||
|
axiosInstance.post('connections/save', {
|
||||||
|
...data,
|
||||||
|
_id: undefined,
|
||||||
|
displayName: `${data.displayName || data.server} - copy`,
|
||||||
|
});
|
||||||
|
};
|
||||||
const handleCreateDatabase = () => {
|
const handleCreateDatabase = () => {
|
||||||
showModal(InputTextModal, {
|
showModal(InputTextModal, {
|
||||||
header: 'Create database',
|
header: 'Create database',
|
||||||
@@ -54,6 +61,10 @@
|
|||||||
text: 'Delete',
|
text: 'Delete',
|
||||||
onClick: handleDelete,
|
onClick: handleDelete,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: 'Duplicate',
|
||||||
|
onClick: handleDuplicate,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
!data.singleDatabase && [
|
!data.singleDatabase && [
|
||||||
!$openedConnections.includes(data._id) && {
|
!$openedConnections.includes(data._id) && {
|
||||||
|
|||||||
Reference in New Issue
Block a user