diff --git a/awx/ui/client/features/jobs/_index.less b/awx/ui/client/features/jobs/_index.less index 020ee3f46e..5b66ff8366 100644 --- a/awx/ui/client/features/jobs/_index.less +++ b/awx/ui/client/features/jobs/_index.less @@ -1,7 +1,7 @@ .at-Stdout { font-family: monospace; - &-controls { + &-menu { color: @at-gray-dark-4x; border: 1px solid @at-gray-dark-2x; border-top-left-radius: 4px; @@ -9,12 +9,12 @@ border-bottom: none; } - &-controlIcon { + &-menuIcon { font-size: 12px; padding: 10px; } - &-expand { + &-toggle { color: @at-gray-dark-4x; background-color: @at-gray-light; font-size: 12px; @@ -22,25 +22,38 @@ padding: 0 20px 0 10px; } - &-lineNumber { + &-line { color: @at-gray-dark-4x; background-color: @at-gray-light; + text-align: right; + padding-right: 5px; border-right: 1px solid @at-gray-dark; } - &-content { - padding-left: 20px; + &-event { + padding-left: 2ch; + width: 83ch; } - &-timestamp { + &-time { padding-left: 20px; font-size: 12px; text-align: right; } - &-output { + &-container { + & > table { + table-layout: fixed; + + td { + vertical-align: top; + word-wrap: break-word; + white-space: pre-wrap; + } + } + font-size: 14px; border: 1px solid @at-gray-dark-2x; background-color: @at-gray-light-3x; diff --git a/awx/ui/client/features/output/index.controller.js b/awx/ui/client/features/output/index.controller.js index fa61c0df6c..c571062641 100644 --- a/awx/ui/client/features/output/index.controller.js +++ b/awx/ui/client/features/output/index.controller.js @@ -33,6 +33,7 @@ function JobsIndexController (job, $sce) { function parseEvents (events) { events.sort(orderByLineNumber); + console.log(events); return events.reduce((html, event) => `${html}${parseLine(event)}`, ''); } @@ -67,20 +68,20 @@ function parseLine (event) { const isLastLine = i === lines.length - 1; if (isTruncated && isLastLine) { - return `${html}${createRow(ln, line, time, group)}${createTruncatedRow()}`; + return `${html}${createRow(ln, line, time, group)}${createTruncatedRow(event.id)}`; } return `${html}${createRow(ln, line, time, group)}`; }, ''); } -function createTruncatedRow () { +function createTruncatedRow (id) { return ` - - - - - + + + ... + + `; } @@ -94,10 +95,10 @@ function createRow (ln, content, time, group) { return ` - ${expand} - ${ln} - ${content} - ${time} + ${expand} + ${ln} + ${content} + ${time} `; } @@ -129,13 +130,17 @@ function getTime (event, i) { function toggle (id) { console.log(id); } - /* + * + *function getTruncatedEvent () { + * + *} + * *function addDynamic (start) { * document.getElementsByClassName('parent') *} + * */ - JobsIndexController.$inject = ['job', '$sce']; module.exports = JobsIndexController; diff --git a/awx/ui/client/features/output/index.js b/awx/ui/client/features/output/index.js index 558a1e4714..abe9a5edec 100644 --- a/awx/ui/client/features/output/index.js +++ b/awx/ui/client/features/output/index.js @@ -28,7 +28,12 @@ function JobsRun ($stateExtender, strings) { const { id } = $stateParams; return new Jobs('get', id) - .then(job => job.extend('job_events')); + .then(job => job.extend('job_events', { + params: { + page_size: 200, + order_by: 'start_line' + } + })); }] } }); diff --git a/awx/ui/client/features/output/index.view.html b/awx/ui/client/features/output/index.view.html index 6b51b5f548..5a585c7321 100644 --- a/awx/ui/client/features/output/index.view.html +++ b/awx/ui/client/features/output/index.view.html @@ -6,26 +6,26 @@
-
-
-
+
+
+
-

+            
- - - + + + - - - + + +
  
   Back to Top
diff --git a/awx/ui/client/lib/models/Base.js b/awx/ui/client/lib/models/Base.js index a2c202aa79..ee63b97076 100644 --- a/awx/ui/client/lib/models/Base.js +++ b/awx/ui/client/lib/models/Base.js @@ -327,25 +327,17 @@ function has (method, keys) { return value !== undefined && value !== null; } -function extend (method, related, config = {}) { - if (!related) { - related = method; - method = 'GET'; - } else { - method = method.toUpperCase(); - } +function extend (related, config) { + const req = this.parseRequestConfig('GET', config); - if (this.has(method, `related.${related}`)) { - const req = { - method, - url: this.get(`related.${related}`) - }; + if (this.has(req.method, `related.${related}`)) { + req.url = this.get(`related.${related}`); Object.assign(req, config); return $http(req) .then(({ data }) => { - this.set(method, `related.${related}`, data); + this.set(req.method, `related.${related}`, data); return this; });