From 14985613c91ff09e305b82b589fa7eecfe70c3bd Mon Sep 17 00:00:00 2001 From: Erwin Dondorp Date: Sat, 11 May 2024 22:05:55 +0200 Subject: [PATCH] WIP --- saltgui/static/scripts/issues/State.js | 4 ++++ saltgui/static/scripts/output/Output.js | 6 ++++++ saltgui/static/scripts/panels/HighState.js | 2 ++ saltgui/static/scripts/panels/JobsDetails.js | 2 ++ saltgui/static/scripts/panels/Nodegroups.js | 6 ++++++ saltgui/static/scripts/panels/Options.js | 2 ++ saltgui/static/scripts/panels/Stats.js | 2 ++ 7 files changed, 24 insertions(+) diff --git a/saltgui/static/scripts/issues/State.js b/saltgui/static/scripts/issues/State.js index 887706233..6427161a0 100644 --- a/saltgui/static/scripts/issues/State.js +++ b/saltgui/static/scripts/issues/State.js @@ -85,7 +85,9 @@ export class StateIssues extends Issues { } if (pPanel.playOrPause !== "play") { +console.log("set issues/State1", "setTimeout 1000"); window.setTimeout(() => { +console.log("set issues/State1", "setTimeout 1000"); this._updateNextJob(pPanel, pMsg, pKeys); }, 1000); return; @@ -97,7 +99,9 @@ export class StateIssues extends Issues { runnerJobsListJobPromise.then((pRunnerJobsListJobData) => { StateIssues._handleJobRunnerJobsListJob(pPanel, pRunnerJobsListJobData, pKeys); +console.log("set issues/State2", "setTimeout 100"); window.setTimeout(() => { +console.log("set issues/State2", "setTimeout 100"); this._updateNextJob(pPanel, pMsg, pKeys); }, 100); return true; diff --git a/saltgui/static/scripts/output/Output.js b/saltgui/static/scripts/output/Output.js index f13b2a4fb..905a2ce13 100644 --- a/saltgui/static/scripts/output/Output.js +++ b/saltgui/static/scripts/output/Output.js @@ -516,7 +516,9 @@ export class Output { // show where the information is taskDiv.classList.add("highlight-task"); +console.log("set output/Output1", "setTimeout 1000"); window.setTimeout(() => { +console.log("handle output/Output1", "setTimeout 1000"); taskDiv.classList.remove("highlight-task"); if (!taskDiv.classList.length) { taskDiv.removeAttribute("class"); @@ -1066,7 +1068,9 @@ export class Output { minionOutput.addEventListener("click", (pClickEvent) => { // show where we are scrolling back to minionRow.classList.add("highlight-task"); +console.log("set output/Output2", "setTimeout 1000"); window.setTimeout(() => { +console.log("handle output/Output2", "setTimeout 1000"); minionRow.classList.remove("highlight-task"); if (!minionRow.classList.length) { minionRow.removeAttribute("class"); @@ -1096,7 +1100,9 @@ export class Output { if (div) { const minionRow = div.querySelector("span"); minionRow.classList.add("highlight-task"); +console.log("set output/Output3", "setTimeout 1000"); window.setTimeout(() => { +console.log("handle output/Output3", "setTimeout 1000"); minionRow.classList.remove("highlight-task"); if (!minionRow.classList.length) { minionRow.removeAttribute("class"); diff --git a/saltgui/static/scripts/panels/HighState.js b/saltgui/static/scripts/panels/HighState.js index e040eb6e3..b948d2e73 100644 --- a/saltgui/static/scripts/panels/HighState.js +++ b/saltgui/static/scripts/panels/HighState.js @@ -205,7 +205,9 @@ export class HighStatePanel extends Panel { this._handleJob(job); } +console.log("set panels/Highstate", "setTimeout 1000"); window.setTimeout(() => { +console.log("handle panels/Highstate", "setTimeout 1000"); this._updateNextJob(); }, 1000); } diff --git a/saltgui/static/scripts/panels/JobsDetails.js b/saltgui/static/scripts/panels/JobsDetails.js index b64cb35f7..7f1eeab3a 100644 --- a/saltgui/static/scripts/panels/JobsDetails.js +++ b/saltgui/static/scripts/panels/JobsDetails.js @@ -74,7 +74,9 @@ export class JobsDetailsPanel extends JobsPanel { // to update details // interval should be larger than the retrieval time // to prevent many of such jobs to appear +console.log("set panels/JobsDetails", "setInterval " + LOADING_INTERVAL_IN_MS); this.updateNextJobInterval = window.setInterval(() => { +console.log("handle panels/JobsDetails", "setInterval "+ LOADING_INTERVAL_IN_MS); this._updateNextJob(); }, LOADING_INTERVAL_IN_MS); } diff --git a/saltgui/static/scripts/panels/Nodegroups.js b/saltgui/static/scripts/panels/Nodegroups.js index 78dbfa874..6aa6ee1b0 100644 --- a/saltgui/static/scripts/panels/Nodegroups.js +++ b/saltgui/static/scripts/panels/Nodegroups.js @@ -43,7 +43,9 @@ export class NodegroupsPanel extends Panel { localGrainsItemsPromise.then((pLocalGrainsItemsData) => { this.updateMinions(pLocalGrainsItemsData); +console.log("set panels/Nodegroups1", "setTimeout 100"); window.setTimeout(() => { +console.log("handle panels/Nodegroups1", "setTimeout 100"); this._handleStep(pWheelKeyListAllData.return[0].data.return); }, 100); return true; @@ -222,7 +224,9 @@ export class NodegroupsPanel extends Panel { titleElement.innerHTML = titleElement.innerHTML.replace("(loading)", txt); // try again for more +console.log("set panels/Nodegroups2", "setTimeout 100"); window.setTimeout(() => { +console.log("handle panels/Nodegroups2", "setTimeout 100"); this._handleStep(pWheelKeyListAllSimpleData); }, 100); }, (pLocalTestVersionMsg) => { @@ -271,7 +275,9 @@ export class NodegroupsPanel extends Panel { // system can decide to remove the play/pause button if (this.playOrPause !== "play") { // try again later for more +console.log("set panels/Nodegroups3", "setTimeout 100"); window.setTimeout(() => { +console.log("handle panels/Nodegroups3", "setTimeout 100"); this._handleStep(pWheelKeyListAllSimpleData); }, 100); return; diff --git a/saltgui/static/scripts/panels/Options.js b/saltgui/static/scripts/panels/Options.js index 38c0d3051..1df231dc5 100644 --- a/saltgui/static/scripts/panels/Options.js +++ b/saltgui/static/scripts/panels/Options.js @@ -332,7 +332,9 @@ export class OptionsPanel extends Panel { } if (category === "session" && name === "expire") { +console.log("set panels/Options", "setInterval 1000"); this.updateExpiresTimer = window.setInterval(() => { +console.log("handle panels/Options", "setInterval 1000"); // just redo the whole text-block OptionsPanel._enhanceSessionExpire(td, value, sessionStart); }, 1000); diff --git a/saltgui/static/scripts/panels/Stats.js b/saltgui/static/scripts/panels/Stats.js index f4a2409dc..f5497fa00 100644 --- a/saltgui/static/scripts/panels/Stats.js +++ b/saltgui/static/scripts/panels/Stats.js @@ -33,7 +33,9 @@ export class StatsPanel extends Panel { this.onShowNow(); +console.log("set panels/Stats", "setInterval 5000"); this.updateStatsTimer = window.setInterval(() => { +console.log("handle panels/Stats", "setInterval 5000"); this.onShowNow(); }, 5000); }