mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 17:36:00 +00:00
single connection support
This commit is contained in:
@@ -134,6 +134,13 @@
|
||||
} else {
|
||||
sqlConnectResult = resp;
|
||||
}
|
||||
} else {
|
||||
enableApi();
|
||||
const resp = await apiCall('connections/dblogin-auth', {
|
||||
conid: selectedConnection.conid,
|
||||
});
|
||||
localStorage.setItem('accessToken', resp.accessToken);
|
||||
internalRedirectTo('?');
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -10,11 +10,16 @@ import hasPermission from '../utility/hasPermission';
|
||||
// };
|
||||
|
||||
const doServerPing = value => {
|
||||
const config = getCurrentConfig();
|
||||
|
||||
const conidArray = [...value];
|
||||
if (getCurrentConfig().storageDatabase && hasPermission('internal-storage')) {
|
||||
if (config.storageDatabase && hasPermission('internal-storage')) {
|
||||
conidArray.push('__storage');
|
||||
}
|
||||
conidArray.push(...getVolatileConnections());
|
||||
if (config.singleConnection) {
|
||||
conidArray.push(config.singleConnection._id);
|
||||
}
|
||||
|
||||
apiCall('server-connections/ping', {
|
||||
conidArray,
|
||||
@@ -51,4 +56,4 @@ export function subscribeConnectionPingers() {
|
||||
export function callServerPing() {
|
||||
const connections = getOpenedConnections();
|
||||
doServerPing(connections);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user