mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 10:46:00 +00:00
stream filtering by connection id
This commit is contained in:
@@ -8,6 +8,9 @@ import { isOauthCallback, redirectToLogin } from '../clientAuth';
|
||||
import { showModal } from '../modals/modalTools';
|
||||
import DatabaseLoginModal, { isDatabaseLoginVisible } from '../modals/DatabaseLoginModal.svelte';
|
||||
import _ from 'lodash';
|
||||
import uuidv1 from 'uuid/v1';
|
||||
|
||||
export const strmid = uuidv1();
|
||||
|
||||
let eventSource;
|
||||
let apiLogging = false;
|
||||
@@ -49,7 +52,7 @@ export function removeVolatileMapping(conid) {
|
||||
|
||||
function wantEventSource() {
|
||||
if (!eventSource) {
|
||||
eventSource = new EventSource(`${resolveApi()}/stream`);
|
||||
eventSource = new EventSource(`${resolveApi()}/stream?strmid=${strmid}`);
|
||||
// eventSource.addEventListener('clean-cache', e => cacheClean(JSON.parse(e.data)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import { openedConnections, currentDatabase } from '../stores';
|
||||
import { apiCall } from './api';
|
||||
import { apiCall, strmid } from './api';
|
||||
import { getConnectionList } from './metadataLoaders';
|
||||
|
||||
// const doServerPing = async value => {
|
||||
@@ -10,7 +10,7 @@ import { getConnectionList } from './metadataLoaders';
|
||||
// };
|
||||
|
||||
const doServerPing = value => {
|
||||
apiCall('server-connections/ping', { conidArray: value });
|
||||
apiCall('server-connections/ping', { conidArray: value, strmid });
|
||||
};
|
||||
|
||||
const doDatabasePing = value => {
|
||||
|
||||
Reference in New Issue
Block a user