diff --git a/awx/ui/client/features/jobs/_index.less b/awx/ui/client/features/jobs/_index.less index 78e1de6b33..1ebec50483 100644 --- a/awx/ui/client/features/jobs/_index.less +++ b/awx/ui/client/features/jobs/_index.less @@ -11,10 +11,28 @@ &-menuBottom { color: @at-gray-dark-4x; - border: 1px solid @at-gray-dark-2x; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top: none; + font-size: 10px; + text-transform: uppercase; + font-weight: bold; + position: absolute; + right: 60px; + bottom: 24px; + cursor: pointer; + } + + &-menuIconGroup { + & > p { + margin: 0; + } + + & > p:first-child { + font-size: 20px; + margin-right: 8px; + } + + & > p:last-child { + margin-top: 9px; + } } &-menuIcon { @@ -26,25 +44,24 @@ &-toggle { color: @at-gray-dark-4x; background-color: @at-gray-light; - font-size: 12px; + font-size: 18px; + line-height: 12px; & > i { cursor: pointer; } - padding: 0 20px 0 10px; + padding: 0 10px 0 10px; user-select: none; } &-line { - color: @at-gray-dark-4x; + color: @at-gray-dark-6x; background-color: @at-gray-light; - text-align: right; - vertical-align: top; padding-right: 5px; - border-right: 1px solid @at-gray-dark; + border-right: 1px solid @at-gray-dark-2x; user-select: none; } @@ -64,16 +81,25 @@ text-align: right; user-select: none; width: 11ch; + + & > span { + background-color: white; + border-radius: 4px; + padding: 1px 2px; + } } &-container { max-height: 80vh; - font-size: 14px; + font-size: 15px; border: 1px solid @at-gray-dark-2x; - background-color: @at-gray-light-3x; + background-color: @at-gray-light-2x; + color: @at-gray-dark-6x; padding: 0; margin: 0; border-radius: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; & > table { table-layout: fixed; diff --git a/awx/ui/client/features/output/index.controller.js b/awx/ui/client/features/output/index.controller.js index c94660d298..0926846e42 100644 --- a/awx/ui/client/features/output/index.controller.js +++ b/awx/ui/client/features/output/index.controller.js @@ -5,13 +5,16 @@ let vm; let ansi; let job; let jobEvent; +let container; let $timeout; let $sce; let $compile; let $scope; const record = {}; -const meta = {}; +const meta = { + scroll: {} +}; const EVENT_START_TASK = 'playbook_on_task_start'; const EVENT_START_PLAY = 'playbook_on_play_start'; @@ -52,10 +55,13 @@ function JobsIndexController (_job_, JobEventModel, _$sce_, _$timeout_, _$scope_ vm.showHostDetails = showHostDetails; vm.menu = { - scroll, + scroll: { + display: false, + to: scrollTo + }, top: { expand, - isExpanded: false + isExpanded: true }, bottom: { next @@ -64,9 +70,15 @@ function JobsIndexController (_job_, JobEventModel, _$sce_, _$timeout_, _$scope_ $timeout(() => { const table = $('#result-table'); + container = $('.at-Stdout-container'); table.html($sce.getTrustedHtml(html)); $compile(table.contents())($scope); + + meta.scroll.height = container[0].scrollHeight; + meta.scroll.buffer = 100; + + container.scroll(onScroll); }); } @@ -78,16 +90,14 @@ function next () { } function expand () { - vm.toggle(meta.parent); + vm.toggle(meta.parent, true); } -function scroll (direction) { - const container = $('.at-Stdout-container')[0]; - +function scrollTo (direction) { if (direction === 'top') { - container.scrollTop = 0; + container[0].scrollTop = 0; } else { - container.scrollTop = container.scrollHeight; + container[0].scrollTop = container[0].scrollHeight; } } @@ -222,7 +232,7 @@ function createRow (current, ln, content) { if (current) { if (current.isParent && current.line === ln) { id = current.uuid; - tdToggle = `