This commit is contained in:
SPRINX0\prochazka
2025-02-03 14:43:08 +01:00
parent 0f36ea7b58
commit 4d8952d3ee

View File

@@ -243,7 +243,7 @@
tabComponent: 'QueryDesignTab', tabComponent: 'QueryDesignTab',
focused: true, focused: true,
props: { props: {
conid: connection._id, conid: connection?._id,
database: name, database: name,
}, },
}); });
@@ -255,7 +255,7 @@
icon: 'img perspective', icon: 'img perspective',
tabComponent: 'PerspectiveTab', tabComponent: 'PerspectiveTab',
props: { props: {
conid: connection._id, conid: connection?._id,
database: name, database: name,
}, },
}); });
@@ -267,14 +267,14 @@
icon: 'img profiler', icon: 'img profiler',
tabComponent: 'ProfilerTab', tabComponent: 'ProfilerTab',
props: { props: {
conid: connection._id, conid: connection?._id,
database: name, database: name,
}, },
}); });
}; };
const handleRefreshSchemas = () => { const handleRefreshSchemas = () => {
const conid = connection._id; const conid = connection?._id;
const database = name; const database = name;
apiCall('database-connections/dispatch-database-changed-event', { apiCall('database-connections/dispatch-database-changed-event', {
event: 'schema-list-changed', event: 'schema-list-changed',
@@ -285,7 +285,7 @@
}; };
async function handleConfirmSql(sql) { async function handleConfirmSql(sql) {
saveScriptToDatabase({ conid: connection._id, database: name }, sql, false); saveScriptToDatabase({ conid: connection?._id, database: name }, sql, false);
} }
const handleGenerateDropAllObjectsScript = () => { const handleGenerateDropAllObjectsScript = () => {
@@ -559,7 +559,7 @@ await dbgateApi.dropAllDbObjects(${JSON.stringify(
: $lockedDatabaseMode : $lockedDatabaseMode
? getNumberIcon( ? getNumberIcon(
$openedTabs.filter( $openedTabs.filter(
x => !x.closedTime && x.props.conid == data?.connection?._id && x.props.database == data?.name x => !x.closedTime && x.props?.conid == data?.connection?._id && x.props?.database == data?.name
).length ).length
) )
: ''} : ''}