diff --git a/awx/ui/client/features/jobs/_index.less b/awx/ui/client/features/jobs/_index.less index 50597f1b1a..15acc8c90f 100644 --- a/awx/ui/client/features/jobs/_index.less +++ b/awx/ui/client/features/jobs/_index.less @@ -1,9 +1,27 @@ .at-Stdout { + font-family: monospace; + + &-controls { + border: 1px solid @at-gray-dark-2x; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: none; + } + + &-controlIcon { + font-size: 16px; + padding: 10px; + } + &-expand { - padding-right: 10px; + background-color: @at-gray-light-2x; + + padding: 0 10px; } &-lineNumber { + background-color: @at-gray-light-2x; + padding-right: 5px; border-right: 1px solid gray; } @@ -15,4 +33,14 @@ &-timestamp { padding-left: 20px; } + + &-output { + font-size: 14px; + border: 1px solid @at-gray-dark-2x; + background-color: @at-gray-light-3x; + padding: 0; + margin: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; + } } diff --git a/awx/ui/client/features/output/index.controller.js b/awx/ui/client/features/output/index.controller.js index d94971ce7f..01db5efeca 100644 --- a/awx/ui/client/features/output/index.controller.js +++ b/awx/ui/client/features/output/index.controller.js @@ -27,14 +27,27 @@ function JobsIndexController (job, $sce) { const html = parseEvents(events); vm.html = $sce.trustAsHtml(html); + vm.toggle = toggle; } function parseEvents (events) { - events.sort((a, b) => a.start_line > b.start_line); + events.sort(orderByLineNumber); return events.reduce((html, event) => `${html}${parseLine(event)}`, ''); } +function orderByLineNumber (a, b) { + if (a.start_line > b.start_line) { + return 1; + } + + if (a.start_line < b.start_line) { + return -1; + } + + return 0; +} + function parseLine (event) { if (!event || !event.stdout) { return ''; @@ -60,7 +73,7 @@ function createRow (ln, content, time, group) { let expand = ''; if (group.parent) { - expand = ''; + expand = ''; } return ` @@ -97,6 +110,16 @@ function getTime (event, i) { return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`; } +function toggle (id) { + console.log(id); +} + +/* + *function addDynamic (start) { + * document.getElementsByClassName('parent') + *} + */ + JobsIndexController.$inject = ['job', '$sce']; module.exports = JobsIndexController; diff --git a/awx/ui/client/features/output/index.view.html b/awx/ui/client/features/output/index.view.html index 92d2594851..8c43a4ae8a 100644 --- a/awx/ui/client/features/output/index.view.html +++ b/awx/ui/client/features/output/index.view.html @@ -5,11 +5,16 @@
++ ++ +++ +- - +