diff --git a/saltgui/static/scripts/output/Output.js b/saltgui/static/scripts/output/Output.js index 06eb1880f..eef1e0500 100644 --- a/saltgui/static/scripts/output/Output.js +++ b/saltgui/static/scripts/output/Output.js @@ -615,7 +615,7 @@ export class Output { // the orchestrator for the output // determines what format should be used and uses that - static addResponseOutput (pOutputContainer, pJobId, pMinionData, pResponse, pCommand, pInitialStatus, pHighlightMinionId, pArguments) { + static addResponseOutput (pOutputContainer, pJobId, pMinionData, pResponse, pCommand, pInitialStatus, pHighlightMinionId, pExtraInfo) { // remove old content pOutputContainer.innerText = ""; @@ -737,10 +737,12 @@ export class Output { topSummaryDiv.appendChild(summaryJobsListJobSpan); } - if (pArguments) { - const div = Utils.createDiv("", pArguments); - div.style.lineBreak = "anywhere"; - pOutputContainer.appendChild(div); + if (pExtraInfo) { + for (const str of pExtraInfo) { + const div = Utils.createDiv("", str); + div.style.lineBreak = "anywhere"; + pOutputContainer.appendChild(div); + } } const masterTriangle = Utils.createSpan(); diff --git a/saltgui/static/scripts/panels/Job.js b/saltgui/static/scripts/panels/Job.js index d01dbac04..e9bddbfc7 100644 --- a/saltgui/static/scripts/panels/Job.js +++ b/saltgui/static/scripts/panels/Job.js @@ -198,16 +198,24 @@ export class JobPanel extends Panel { // ============================ const maxTextLength = 50; - let displayArguments = null; + const extraInfo = []; + if (argumentsText.length > maxTextLength) { - // prevent column becoming too wide - displayArguments = this.commandtext; + // prevent title becoming too wide + // save info for display in actual output box + extraInfo.push(this.commandtext); argumentsText = argumentsText.substring(0, maxTextLength) + Character.HORIZONTAL_ELLIPSIS; } - const functionText = info.Function + argumentsText + " on " + - TargetType.makeTargetText(info); - this.updateTitle(functionText); + let targetText = "on " + TargetType.makeTargetText(info); + if (targetText.length > maxTextLength) { + // prevent title becoming too wide + // save info for display in actual output box + extraInfo.push(targetText); + targetText = targetText.substring(0, maxTextLength) + Character.HORIZONTAL_ELLIPSIS; + } + + this.updateTitle(info.Function + argumentsText + " " + targetText); Output.dateTimeStr(info.StartTime, this.timeField, "bottom-left"); @@ -237,7 +245,7 @@ export class JobPanel extends Panel { initialStatus = "(loading)"; this.jobIsTerminated = false; } - Output.addResponseOutput(this.output, pJobId, minions, info.Result, info.Function, initialStatus, pMinionId, displayArguments); + Output.addResponseOutput(this.output, pJobId, minions, info.Result, info.Function, initialStatus, pMinionId, extraInfo); // replace any jobid // Don't do this with output.innerHTML as there are already