mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 22:36: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')) {
|
||||
registerCommand({
|
||||
id: 'settings.commands',
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
.window.simplefix {
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
max-width: 750px;
|
||||
margin-top: 10vh;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,14 @@
|
||||
command: 'database.export',
|
||||
testid: 'NewObjectModal_databaseExport',
|
||||
},
|
||||
{
|
||||
icon: 'icon compare',
|
||||
colorClass: 'color-icon-red',
|
||||
title: 'Compare database',
|
||||
description: 'Compare database schemas',
|
||||
command: 'database.compare',
|
||||
testid: 'NewObjectModal_databaseCompare',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user