data duplicator tab - configurator

This commit is contained in:
Jan Prochazka
2023-02-10 16:50:27 +01:00
parent 8df2a8a6df
commit b5f504f3b1
4 changed files with 155 additions and 2 deletions

View File

@@ -102,8 +102,27 @@ await dbgateApi.deployDb(${JSON.stringify(
editor: {
sourceConid: '__model',
sourceDatabase: `archive:${data.name}`,
targetConid: _.get($currentDatabase, 'connection._id'),
targetDatabase: _.get($currentDatabase, 'name'),
targetConid: $currentDatabase?.connection?._id,
targetDatabase: $currentDatabase?.name,
},
}
);
};
const handleOpenDuplicatorTab = () => {
openNewTab(
{
title: data.name,
icon: 'img duplicator',
tabComponent: 'DataDuplicatorTab',
props: {
conid: $currentDatabase?.connection?._id,
database: $currentDatabase?.name,
},
},
{
editor: {
archiveFolder: data.name,
},
}
);
@@ -115,6 +134,7 @@ await dbgateApi.deployDb(${JSON.stringify(
data.name != 'default' && { text: 'Rename', onClick: handleRename },
data.name != 'default' &&
$currentDatabase && [
{ text: 'Data duplicator', onClick: handleOpenDuplicatorTab },
{ text: 'Generate deploy DB SQL - experimental', onClick: handleGenerateDeploySql },
{ text: 'Shell: Deploy DB - experimental', onClick: handleGenerateDeployScript },
],