Skip to content

Commit 8f289e8

Browse files
committed
Allow hiding the job info headers too
This saves a lot of space when a lot of logs are hidden. Thanks to thuban & JAA for the wording.
1 parent c3429cc commit 8f289e8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

dashboard/assets/scripts/dashboard.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,7 @@ class Dashboard {
10211021
const showNicks = args.showNicks ? Boolean(Number(args.showNicks)) : false;
10221022
const contextMenu = args.contextMenu ? Boolean(Number(args.contextMenu)) : true;
10231023
const initialFilter = args.initialFilter ?? "^$";
1024+
const showAllHeaders = args.showAllHeaders ? Boolean(Number(args.showAllHeaders)) : true;
10241025
const loadRecent = args.loadRecent ? Boolean(Number(args.loadRecent)) : true;
10251026
this.debug = args.debug ? Boolean(Number(args.debug)) : false;
10261027

@@ -1069,6 +1070,8 @@ class Dashboard {
10691070
addPageStyles(".job-nick-aligned { width: 0; }");
10701071
}
10711072

1073+
this.showAllHeaders(showAllHeaders);
1074+
10721075
this.setFilter(initialFilter);
10731076

10741077
const finishSetup = () => {
@@ -1249,6 +1252,11 @@ ${String(kbPerSec).padStart(3, "0")} KB/s`;
12491252
byId("filter-box").value = value;
12501253
byId("filter-box").onchange();
12511254
}
1255+
1256+
showAllHeaders(value) {
1257+
byId('show-all-headers').checked = value;
1258+
byId('hide-headers').sheet.disabled = value;
1259+
}
12521260
}
12531261

12541262
const ds = new Dashboard();

dashboard/dashboard.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@
391391
top: 0;
392392
}
393393
</style>
394+
<style id="hide-headers">
395+
.log-container:has(.log-window-hidden) {
396+
display: none;
397+
content-visibility: hidden;
398+
}
399+
</style>
394400
<div id="context-menu"></div>
395401
<div class="padded-page">
396402
<div class="header">
@@ -401,6 +407,8 @@
401407
Show: <input id="filter-box" type="text" size="21">
402408
<input onclick="ds.setFilter('');" type="button" value=" All " class="button">
403409
<input onclick="ds.setFilter('^$');" type="button" value="None" class="button">
410+
<input type="checkbox" id="show-all-headers" onclick="ds.showAllHeaders(this.checked);">
411+
<label for="show-all-headers">Show all headers</label>
404412
</div>
405413
<div id="header-right">
406414
<div id="meta-info"><span class="adbox">😊</span></div>

0 commit comments

Comments
 (0)