Skip to content

Commit d42feec

Browse files
author
Erwin Dondorp
committed
do not print context dependent instructions
1 parent e3abff4 commit d42feec

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

saltgui/static/scripts/panels/Events.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,22 @@ export class EventsPanel extends Panel {
3131
}
3232

3333
updateFooter () {
34+
const noprint_b = "<span class='no-print'>";
35+
const noprint_e = "</span>";
36+
3437
// when there are more than a screen-ful of events, the user
3538
// will not see the "press play" message. but the user already
3639
// knows that because that caused the events to be shown...
3740
let txt = Utils.txtZeroOneMany(this.nrEvents, "No events", "{0} event", "{0} events");
3841
if (this.playOrPause === "play") {
3942
const tbody = this.table.tBodies[0];
43+
txt += noprint_b;
4044
if (tbody.rows.length) {
4145
txt += ", waiting for more events";
4246
} else {
4347
txt += ", waiting for events";
4448
}
49+
txt += noprint_e;
4550
}
4651
super.updateFooter(txt);
4752
}

saltgui/static/scripts/panels/Panel.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,16 +743,23 @@ export class Panel {
743743
txt += ", " + Utils.txtZeroOneMany(this.nrUnaccepted, "{0} unaccepted keys", "{0} unaccepted key", "{0} unaccepted keys");
744744
}
745745

746+
const noprint_b = "<span class='no-print'>";
747+
const noprint_e = "</span>";
748+
746749
if (this.playOrPause === "pause" && this.pauseButton) {
750+
txt += noprint_b;
747751
if (this.table && this.table.tBodies[0].rows.length) {
748752
txt += ", press " + Character.buttonInText(Character.CH_PLAY) + " to continue";
749753
} else {
750754
txt += ", press " + Character.buttonInText(Character.CH_PLAY) + " to begin";
751755
}
756+
txt += noprint_e;
752757
}
753758

754759
if (this.playOrPause === "play" && this.playButton) {
760+
txt += noprint_b;
755761
txt += ", press " + Character.buttonInText(Character.CH_PAUSE) + " to pause";
762+
txt += noprint_e;
756763
}
757764

758765
txt = txt.replace(/^, /g, "");

0 commit comments

Comments
 (0)