mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 06:06:01 +00:00
fix: refresh proccesses only if summary tab is opened
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
import { showSnackbarError, showSnackbarSuccess } from '../utility/snackbar';
|
||||
|
||||
export let conid;
|
||||
export let isSummaryOpened: boolean = false;
|
||||
export let processes: DatabaseProcess[] = [];
|
||||
export let refreshInterval: number = 1000;
|
||||
export let tabVisible: boolean = false;
|
||||
@@ -53,7 +54,7 @@
|
||||
|
||||
onMount(() => {
|
||||
const intervalId = setInterval(() => {
|
||||
if (!tabVisible) return;
|
||||
if (!tabVisible || !isSummaryOpened) return;
|
||||
|
||||
refreshProcesses();
|
||||
}, refreshInterval);
|
||||
|
||||
Reference in New Issue
Block a user