Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwin Dondorp committed Oct 25, 2024
1 parent f111018 commit 1498561
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions saltgui/static/scripts/issues/State.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions saltgui/static/scripts/output/Output.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions saltgui/static/scripts/panels/HighState.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions saltgui/static/scripts/panels/JobsDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 6 additions & 0 deletions saltgui/static/scripts/panels/Nodegroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions saltgui/static/scripts/panels/Options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions saltgui/static/scripts/panels/Stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1498561

Please sign in to comment.