Fix inspect activation on queryFinished

This commit is contained in:
Stephan Porada
2020-03-19 11:04:36 +01:00
parent ebe598312f
commit 7de4b391df
2 changed files with 19 additions and 22 deletions

View File

@ -60,6 +60,9 @@ function sendQuery(event) {
// Function used when CQP server sends back the query results using socketio
function recieveResults(response) {
let toolTipInfoElement;
queryFinished = false;
// ERROR code checking
if (response["code"] === 0) {
@ -134,14 +137,12 @@ function recieveResults(response) {
console.log(queryStatus);
queryResultsDeterminateElement.style["width"] = `${queryStatus}%`;
console.log(queryResultsDeterminateElement.style["width"]);
let toolTipInfoElement = document.getElementById("tool-tip-info");
toolTipInfoElement.addEventListener("mouseover", function(event) {
M.Tooltip.init(toolTipInfoElement, {"html": `<p>The Server is still sending you your results. Functions like "Export Results" and "Match Inspect" will be available after all matches have been loaded.</p>`,
"inDuration": 1500,
"margin": 15,
"position": "top",
"transitionMovement": 0})
});
toolTipInfoElement = document.getElementById("tool-tip-info");
M.Tooltip.init(toolTipInfoElement, {"html": `<p>The Server is still sending you your results. Functions like "Export Results" and "Match Inspect" will be available after all matches have been loaded.</p>`,
"inDuration": 1500,
"margin": 15,
"position": "top",
"transitionMovement": 0});
// enable download and inspect when query is finished
// also sets queryFinished to true
if (queryStatus === 100) {
@ -178,6 +179,7 @@ function inspect(dataIndex) {
function showMatchContext(message) {
console.log("### match_context ###");
console.log("Incoming data:", message);
let contextResultsElement = document.getElementById("context-results");
contextResultsElement.innerHTML = "<p>&nbsp;</p>";
document.getElementById("context-modal-loading").classList.add("hide");
document.getElementById("context-modal-ready").classList.remove("hide");