mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 07:46:00 +00:00
timer label
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
import { findEngineDriver } from 'dbgate-tools';
|
||||
import { generateDesignedQuery } from '../designer/designerTools';
|
||||
import QueryDesignColumns from '../elements/QueryDesignColumns.svelte';
|
||||
import useTimerLabel from '../utility/useTimerLabel';
|
||||
|
||||
export let tabid;
|
||||
export let conid;
|
||||
@@ -54,6 +55,7 @@
|
||||
|
||||
const instance = get_current_component();
|
||||
const tabVisible: any = getContext('tabVisible');
|
||||
const timerLabel = useTimerLabel();
|
||||
|
||||
let busy = false;
|
||||
let executeNumber = 0;
|
||||
@@ -124,7 +126,7 @@
|
||||
sessionId = sesid;
|
||||
}
|
||||
busy = true;
|
||||
// timerLabel.start();
|
||||
timerLabel.start();
|
||||
await axiosInstance.post('sessions/execute-query', {
|
||||
sesid,
|
||||
sql: sqlPreview,
|
||||
@@ -137,7 +139,7 @@
|
||||
});
|
||||
sessionId = null;
|
||||
busy = false;
|
||||
// timerLabel.stop();
|
||||
timerLabel.stop();
|
||||
}
|
||||
|
||||
export function getData() {
|
||||
@@ -168,7 +170,7 @@
|
||||
|
||||
const handleSessionDone = () => {
|
||||
busy = false;
|
||||
// timerLabel.stop();
|
||||
timerLabel.stop();
|
||||
};
|
||||
|
||||
const handleChange = (value, skipUndoChain) =>
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
import invalidateCommands from '../commands/invalidateCommands';
|
||||
import { showModal } from '../modals/modalTools';
|
||||
import InsertJoinModal from '../modals/InsertJoinModal.svelte';
|
||||
import useTimerLabel from '../utility/useTimerLabel';
|
||||
|
||||
export let tabid;
|
||||
export let conid;
|
||||
@@ -65,6 +66,7 @@
|
||||
|
||||
const instance = get_current_component();
|
||||
const tabVisible: any = getContext('tabVisible');
|
||||
const timerLabel = useTimerLabel();
|
||||
|
||||
let busy = false;
|
||||
let executeNumber = 0;
|
||||
@@ -131,7 +133,7 @@
|
||||
sessionId = sesid;
|
||||
}
|
||||
busy = true;
|
||||
// timerLabel.start();
|
||||
timerLabel.start();
|
||||
await axiosInstance.post('sessions/execute-query', {
|
||||
sesid,
|
||||
sql: selectedText || $editorValue,
|
||||
@@ -144,7 +146,7 @@
|
||||
});
|
||||
sessionId = null;
|
||||
busy = false;
|
||||
// timerLabel.stop();
|
||||
timerLabel.stop();
|
||||
}
|
||||
|
||||
// export function getStatus() {
|
||||
@@ -195,7 +197,7 @@
|
||||
|
||||
const handleSessionDone = () => {
|
||||
busy = false;
|
||||
// timerLabel.stop();
|
||||
timerLabel.stop();
|
||||
};
|
||||
|
||||
const { editorState, editorValue, setEditorData } = useEditorData({
|
||||
|
||||
@@ -38,10 +38,12 @@
|
||||
import memberStore from '../utility/memberStore';
|
||||
import socket from '../utility/socket';
|
||||
import useEffect from '../utility/useEffect';
|
||||
import useTimerLabel from '../utility/useTimerLabel';
|
||||
|
||||
export let tabid;
|
||||
|
||||
const tabVisible: any = getContext('tabVisible');
|
||||
const timerLabel = useTimerLabel();
|
||||
|
||||
let runnerId;
|
||||
|
||||
@@ -90,7 +92,7 @@
|
||||
|
||||
function handleRunnerDone() {
|
||||
busy = false;
|
||||
// timerLabel.stop();
|
||||
timerLabel.stop();
|
||||
}
|
||||
|
||||
// export function getStatus() {
|
||||
@@ -138,14 +140,14 @@
|
||||
runid = resp.data.runid;
|
||||
runnerId = runid;
|
||||
busy = true;
|
||||
//timerLabel.start();
|
||||
timerLabel.start();
|
||||
}
|
||||
|
||||
export function kill() {
|
||||
axiosInstance.post('runners/cancel', {
|
||||
runid: runnerId,
|
||||
});
|
||||
// timerLabel.stop();
|
||||
timerLabel.stop();
|
||||
}
|
||||
|
||||
const { editorState, editorValue, setEditorData } = useEditorData({ tabid });
|
||||
|
||||
Reference in New Issue
Block a user