mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 12:14:00 +00:00
compare model fix
This commit is contained in:
@@ -401,6 +401,10 @@ module.exports = {
|
|||||||
|
|
||||||
structure_meta: true,
|
structure_meta: true,
|
||||||
async structure({ conid, database, modelTransFile = null }, req) {
|
async structure({ conid, database, modelTransFile = null }, req) {
|
||||||
|
if (!conid || !database) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
testConnectionPermission(conid, req);
|
testConnectionPermission(conid, req);
|
||||||
if (conid == '__model') {
|
if (conid == '__model') {
|
||||||
const model = await importDbModel(database);
|
const model = await importDbModel(database);
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ await dbgateApi.deployDb(${JSON.stringify(
|
|||||||
title: 'Compare',
|
title: 'Compare',
|
||||||
icon: 'img compare',
|
icon: 'img compare',
|
||||||
tabComponent: 'CompareModelTab',
|
tabComponent: 'CompareModelTab',
|
||||||
|
props: {
|
||||||
|
conid: $currentDatabase?.connection?._id,
|
||||||
|
database: $currentDatabase?.name,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
editor: {
|
editor: {
|
||||||
|
|||||||
@@ -196,13 +196,17 @@
|
|||||||
title: 'Compare',
|
title: 'Compare',
|
||||||
icon: 'img compare',
|
icon: 'img compare',
|
||||||
tabComponent: 'CompareModelTab',
|
tabComponent: 'CompareModelTab',
|
||||||
|
props: {
|
||||||
|
conid: $currentDatabase?.connection?._id,
|
||||||
|
database: $currentDatabase?.name,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
editor: {
|
editor: {
|
||||||
sourceConid: _.get($currentDatabase, 'connection._id'),
|
sourceConid: connection?._id,
|
||||||
sourceDatabase: _.get($currentDatabase, 'name'),
|
sourceDatabase: name,
|
||||||
targetConid: _.get(connection, '_id'),
|
targetConid: $currentDatabase?.connection?._id,
|
||||||
targetDatabase: name,
|
targetDatabase: $currentDatabase?.name,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const doServerPing = value => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apiCall('server-connections/ping', {
|
apiCall('server-connections/ping', {
|
||||||
conidArray,
|
conidArray: _.compact(conidArray),
|
||||||
strmid,
|
strmid,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user