mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
SYNC: export db window
This commit is contained in:
committed by
Diflow
parent
473080d7ee
commit
d6eb06cb72
@@ -654,7 +654,10 @@ registerCommand({
|
|||||||
name: 'SQL Generator',
|
name: 'SQL Generator',
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
icon: 'icon sql-generator',
|
icon: 'icon sql-generator',
|
||||||
testEnabled: () => getCurrentDatabase() != null && hasPermission(`dbops/sql-generator`),
|
testEnabled: () =>
|
||||||
|
getCurrentDatabase() != null &&
|
||||||
|
hasPermission(`dbops/sql-generator`) &&
|
||||||
|
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql'),
|
||||||
onClick: () =>
|
onClick: () =>
|
||||||
showModal(SqlGeneratorModal, {
|
showModal(SqlGeneratorModal, {
|
||||||
conid: getCurrentDatabase()?.connection?._id,
|
conid: getCurrentDatabase()?.connection?._id,
|
||||||
@@ -662,6 +665,23 @@ registerCommand({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
registerCommand({
|
||||||
|
id: 'database.export',
|
||||||
|
category: 'Database',
|
||||||
|
name: 'Export database',
|
||||||
|
toolbar: true,
|
||||||
|
icon: 'icon export',
|
||||||
|
testEnabled: () => getCurrentDatabase() != null,
|
||||||
|
onClick: () => {
|
||||||
|
openImportExportTab({
|
||||||
|
targetStorageType: getDefaultFileFormat(getExtensions()).storageType,
|
||||||
|
sourceStorageType: 'database',
|
||||||
|
sourceConnectionId: getCurrentDatabase()?.connection?._id,
|
||||||
|
sourceDatabaseName: getCurrentDatabase()?.name,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
if (hasPermission('settings/change')) {
|
if (hasPermission('settings/change')) {
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'settings.commands',
|
id: 'settings.commands',
|
||||||
|
|||||||
@@ -77,6 +77,14 @@
|
|||||||
command: 'sql.generator',
|
command: 'sql.generator',
|
||||||
testid: 'NewObjectModal_sqlGenerator',
|
testid: 'NewObjectModal_sqlGenerator',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'icon export',
|
||||||
|
colorClass: 'color-icon-green',
|
||||||
|
title: 'Export database',
|
||||||
|
description: 'Export to file like CSV, JSON, Excel, or other DB',
|
||||||
|
command: 'database.export',
|
||||||
|
testid: 'NewObjectModal_databaseExport',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user