Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hiding the job info headers too #586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dashboard/assets/scripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ class Dashboard {
const showNicks = args.showNicks ? Boolean(Number(args.showNicks)) : false;
const contextMenu = args.contextMenu ? Boolean(Number(args.contextMenu)) : true;
const initialFilter = args.initialFilter ?? "^$";
const showAllHeaders = args.showAllHeaders ? Boolean(Number(args.showAllHeaders)) : true;
const loadRecent = args.loadRecent ? Boolean(Number(args.loadRecent)) : true;
this.debug = args.debug ? Boolean(Number(args.debug)) : false;

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

this.showAllHeaders(showAllHeaders);

this.setFilter(initialFilter);

const finishSetup = () => {
Expand Down Expand Up @@ -1249,6 +1252,11 @@ ${String(kbPerSec).padStart(3, "0")} KB/s`;
byId("filter-box").value = value;
byId("filter-box").onchange();
}

showAllHeaders(value) {
byId('show-all-headers').checked = value;
byId('hide-headers').sheet.disabled = value;
}
}

const ds = new Dashboard();
8 changes: 8 additions & 0 deletions dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@
top: 0;
}
</style>
<style id="hide-headers">
.log-container:has(.log-window-hidden) {
display: none;
content-visibility: hidden;
}
</style>
<div id="context-menu"></div>
<div class="padded-page">
<div class="header">
Expand All @@ -401,6 +407,8 @@
Show: <input id="filter-box" type="text" size="21">
<input onclick="ds.setFilter('');" type="button" value=" All " class="button">
<input onclick="ds.setFilter('^$');" type="button" value="None" class="button">
<input type="checkbox" id="show-all-headers" onclick="ds.showAllHeaders(this.checked);">
<label for="show-all-headers">Show all headers</label>
</div>
<div id="header-right">
<div id="meta-info"><span class="adbox">😊</span></div>
Expand Down