Skip to content

Commit

Permalink
refresh icon can be suppressed when it is already known that the job …
Browse files Browse the repository at this point in the history
…is done, closes #358
  • Loading branch information
Erwin Dondorp committed Apr 27, 2021
1 parent 22380fc commit 832b922
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions saltgui/static/scripts/panels/JobsDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,24 @@ export class JobsDetailsPanel extends JobsPanel {
detailsHTML += "</span>";
}

let refreshVisible = true;
if (keyCount === pData.Minions.length) {
// we have results for each minion
refreshVisible = false;
}
const statusSpan = jobTr.querySelector("td span.job-status");
if (statusSpan.innerText === "done") {
// the system said that the job was done
// but still maybe some results are missing
// but these are not underway
refreshVisible = false;
}
const span = Utils.createJobStatusSpan(pJobId, refreshVisible);
detailsSpan.innerText = "";
const span = Utils.createJobStatusSpan(pJobId, keyCount !== pData.Minions.length);
detailsSpan.appendChild(span);
const statusSpan = Utils.createSpan();
statusSpan.innerHTML = detailsHTML;
detailsSpan.appendChild(statusSpan);
const details2Span = Utils.createSpan();
details2Span.innerHTML = detailsHTML;
detailsSpan.appendChild(details2Span);
detailsSpan.classList.remove("no-job-details");
Utils.addToolTip(detailsSpan, "Click to refresh");
}
Expand Down

0 comments on commit 832b922

Please sign in to comment.