mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 14:46:01 +00:00
SYNC: compare database in new object modal
This commit is contained in:
committed by
Diflow
parent
d6eb06cb72
commit
d19851fc0c
@@ -682,6 +682,40 @@ registerCommand({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (isProApp()) {
|
||||||
|
registerCommand({
|
||||||
|
id: 'database.compare',
|
||||||
|
category: 'Database',
|
||||||
|
name: 'Compare databases',
|
||||||
|
toolbar: true,
|
||||||
|
icon: 'icon compare',
|
||||||
|
testEnabled: () =>
|
||||||
|
getCurrentDatabase() != null &&
|
||||||
|
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql'),
|
||||||
|
onClick: () => {
|
||||||
|
openNewTab(
|
||||||
|
{
|
||||||
|
title: 'Compare',
|
||||||
|
icon: 'img compare',
|
||||||
|
tabComponent: 'CompareModelTab',
|
||||||
|
props: {
|
||||||
|
conid: getCurrentDatabase()?.connection?._id,
|
||||||
|
database: getCurrentDatabase()?.name,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
editor: {
|
||||||
|
sourceConid: getCurrentDatabase()?.connection?._id,
|
||||||
|
sourceDatabase: getCurrentDatabase()?.name,
|
||||||
|
targetConid: getCurrentDatabase()?.connection?._id,
|
||||||
|
targetDatabase: getCurrentDatabase()?.name,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (hasPermission('settings/change')) {
|
if (hasPermission('settings/change')) {
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'settings.commands',
|
id: 'settings.commands',
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
.window.simplefix {
|
.window.simplefix {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-width: 600px;
|
max-width: 750px;
|
||||||
margin-top: 10vh;
|
margin-top: 10vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,14 @@
|
|||||||
command: 'database.export',
|
command: 'database.export',
|
||||||
testid: 'NewObjectModal_databaseExport',
|
testid: 'NewObjectModal_databaseExport',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'icon compare',
|
||||||
|
colorClass: 'color-icon-red',
|
||||||
|
title: 'Compare database',
|
||||||
|
description: 'Compare database schemas',
|
||||||
|
command: 'database.compare',
|
||||||
|
testid: 'NewObjectModal_databaseCompare',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user