From 6ef0104cc33359ce9633238715c300f566f31b52 Mon Sep 17 00:00:00 2001 From: Erwin Dondorp Date: Thu, 31 Oct 2024 19:10:33 +0100 Subject: [PATCH] WIP --- saltgui/static/scripts/output/Output.js | 9 +++++++-- saltgui/static/scripts/panels/JobsSummary.js | 3 +++ saltgui/static/stylesheets/main.css | 3 +-- saltgui/static/stylesheets/page.css | 6 +++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/saltgui/static/scripts/output/Output.js b/saltgui/static/scripts/output/Output.js index 4e08ce228..4df8b2fd5 100644 --- a/saltgui/static/scripts/output/Output.js +++ b/saltgui/static/scripts/output/Output.js @@ -117,8 +117,6 @@ export class Output { static setHighlightObject (pParent, pObject, pStyleWhiteSpace = "pre-wrap", pLanguage = null) { const code = Utils.createElem("code"); code.style.whiteSpace = pStyleWhiteSpace; - // light-yellow, but lighter - pParent.style.backgroundColor = "#FFFFF8"; if (pLanguage !== null) { const outputFormats = Utils.getStorageItem("session", "output_formats"); @@ -1113,15 +1111,22 @@ export class Output { }); } +Output.setHighlightObject(minionOutput, minionResponse); + +/* minionOutput.classList.add( "minion-output", minionMultiLine ? "minion-output-multiple" : "minion-output-single"); // hide the per-minion details when we have so many minions +*/ if (triangle && triangle.innerText === Character.WHITE_RIGHT_POINTING_TRIANGLE) { minionOutput.style.display = "none"; } div.append(minionOutput); +minionOutput.innerText = ""; +Output.setHighlightObject(minionOutput, minionResponse); + pOutputContainer.append(div); } diff --git a/saltgui/static/scripts/panels/JobsSummary.js b/saltgui/static/scripts/panels/JobsSummary.js index 17f23f056..53a63e1c9 100644 --- a/saltgui/static/scripts/panels/JobsSummary.js +++ b/saltgui/static/scripts/panels/JobsSummary.js @@ -20,10 +20,12 @@ export class JobsSummaryPanel extends JobsPanel { this.addTable(["-dummy-", "-dummy-"]); this.setTableClickable("page"); this.addMsg(); +console.log("constructor"); } onShow () { super.onShow(MAX_JOBS_SUMMARY); +console.log("onShow"); } /* eslint-disable class-methods-use-this */ @@ -33,6 +35,7 @@ export class JobsSummaryPanel extends JobsPanel { /* eslint-enable class-methods-use-this */ addJob (job) { +console.log("addJob"); const tr = Utils.createTr(); tr.id = Utils.getIdFromJobId(job.id); diff --git a/saltgui/static/stylesheets/main.css b/saltgui/static/stylesheets/main.css index fccba7f1a..b35b596af 100644 --- a/saltgui/static/stylesheets/main.css +++ b/saltgui/static/stylesheets/main.css @@ -278,11 +278,10 @@ h1 { } pre.output { - background-color: #272727; - color: white; margin: 0; padding: 10px; border-radius: 2px; + border: 1px solid black; white-space: pre-wrap; } diff --git a/saltgui/static/stylesheets/page.css b/saltgui/static/stylesheets/page.css index 492a50ecb..276cda23b 100644 --- a/saltgui/static/stylesheets/page.css +++ b/saltgui/static/stylesheets/page.css @@ -20,7 +20,7 @@ pre a.disabled:hover { } pre.output a { - color: yellow; + color: blue; cursor: pointer; } @@ -44,7 +44,7 @@ pre.output div:first-of-type { pre .minion-id.host-success, pre #summary-jobs-active .host-success { - color: lime; + color: #4caf50; } pre .minion-id.host-failure, @@ -279,7 +279,7 @@ table tr td:last-of-type { /* tasks */ .task-success { - color: lime; + color: #4caf50; } .task-success-changes {