mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 22:36:01 +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',
|
||||
toolbar: true,
|
||||
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: () =>
|
||||
showModal(SqlGeneratorModal, {
|
||||
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')) {
|
||||
registerCommand({
|
||||
id: 'settings.commands',
|
||||
|
||||
@@ -77,6 +77,14 @@
|
||||
command: 'sql.generator',
|
||||
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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user