kill query

This commit is contained in:
Jan Prochazka
2020-06-28 15:33:59 +02:00
parent 8e9b6d5ea2
commit 4e1ee72d4d
3 changed files with 23 additions and 1 deletions

View File

@@ -178,6 +178,13 @@ export default function QueryTab({
});
};
const handleKill = () => {
axios.post('sessions/cancel', {
sesid: sessionId,
});
setSessionId(null);
};
const handleKeyDown = (data, hash, keyString, keyCode, event) => {
if (keyCode == keycodes.f5) {
event.preventDefault();
@@ -236,6 +243,8 @@ export default function QueryTab({
cancel={handleCancel}
format={handleFormatCode}
save={saveSqlFileModalState.open}
isConnected={!!sessionId}
kill={handleKill}
/>,
toolbarPortalRef.current
)}