diff --git a/awx/ui/client/src/job-detail/host-event/host-event-details.partial.html b/awx/ui/client/src/job-detail/host-event/host-event-details.partial.html index f650b4335a..60cd44a9b7 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event-details.partial.html +++ b/awx/ui/client/src/job-detail/host-event/host-event-details.partial.html @@ -1,8 +1,5 @@
-
-
EVENT
- -
+
EVENT
HOST diff --git a/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html b/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html index 919617a333..1660de1b57 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html +++ b/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html @@ -12,24 +12,23 @@
- - - + +
-
+
- - - + + +
- \ No newline at end of file + diff --git a/awx/ui/client/src/job-detail/host-event/host-event-stdout.partial.html b/awx/ui/client/src/job-detail/host-event/host-event-stdout.partial.html deleted file mode 100644 index 29f3966e86..0000000000 --- a/awx/ui/client/src/job-detail/host-event/host-event-stdout.partial.html +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/awx/ui/client/src/job-detail/host-event/host-event.block.less b/awx/ui/client/src/job-detail/host-event/host-event.block.less index c18360ca8d..6a3b6d637d 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event.block.less +++ b/awx/ui/client/src/job-detail/host-event/host-event.block.less @@ -2,6 +2,35 @@ @import "awx/ui/client/src/shared/branding/colors.default.less"; @import "awx/ui/client/src/shared/layouts/one-plus-two.less"; +@media screen and (min-width: 768px){ + .HostEvent .modal-dialog{ + width: 700px; + } +} +.HostEvent-controls button.HostEvent-close{ + color: #FFFFFF; + text-transform: uppercase; + padding-left: 15px; + padding-right: 15px; + background-color: @default-link; + &:hover{ + background-color: @default-link-hov; + } +} +.HostEvent-body{ + margin-bottom: 10px; +} +.HostEvent-tab--selected{ + background-color: #D7D7D7 !important; + border-color: #D7D7D7 !important; +} +.HostEvent-view--container{ + width: 100%; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; +} .HostEvent .modal-footer{ border: 0; margin-top: 0px; @@ -30,7 +59,8 @@ } .HostEvent-title{ color: @default-interface-txt; - font-weight: 600; + font-weight: 600; + margin-bottom: 8px; } .HostEvent .modal-body{ max-height: 500px; @@ -43,10 +73,11 @@ } .HostEvent-field{ margin-bottom: 8px; + flex: 0 1 12em; } .HostEvent-field--label{ - .OnePlusTwo-left--detailsLabel; - width: 80px; + text-transform: uppercase; + flex: 0 1 80px; margin-right: 20px; font-size: 12px; word-wrap: break-word; @@ -55,21 +86,20 @@ .OnePlusTwo-left--detailsRow; } .HostEvent-field--content{ - .OnePlusTwo-left--detailsContent; + flex: 0 1 13em; } .HostEvent-details--left, .HostEvent-details--right{ - vertical-align:top; - width:265px; - display: inline-block; + flex: 1 1 47%; } .HostEvent-details--left{ - margin-right: 10px; + margin-right: 40px; } .HostEvent-details--right{ .HostEvent-field--label{ - width: auto; + flex: 0 1 25em; } .HostEvent-field--content{ - text-align: right; + flex: 0 1 15em; + align-self: flex-end; } -} \ No newline at end of file +} diff --git a/awx/ui/client/src/job-detail/host-event/host-event.controller.js b/awx/ui/client/src/job-detail/host-event/host-event.controller.js index 280c7256a6..73b00ae8e5 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event.controller.js +++ b/awx/ui/client/src/job-detail/host-event/host-event.controller.js @@ -17,16 +17,20 @@ if (typeof value === 'object'){return false;} else {return true;} }; - //var CodeMirror; - var codeMirror = function(el, json){ + /* jshint ignore:start */ + var initCodeMirror = function(el, json){ var container = $(el)[0]; - var editor = codeMirror.fromTextArea(container, { + var editor = CodeMirror.fromTextArea(container, { lineNumbers: true, mode: {name: "javascript", json: true} - }); + }); editor.setSize("100%", 300); editor.getDoc().setValue(JSON.stringify(json, null, 4)); }; + /* jshint ignore:end */ + $scope.isActiveState = function(name){ + return $state.current.name === name; + }; $scope.getActiveHostIndex = function(){ var result = $scope.hostResults.filter(function( obj ) { @@ -61,19 +65,21 @@ $scope.hostResults = res.results; }); $scope.json = JobDetailService.processJson($scope.event); + /* jshint ignore:start */ if ($state.current.name === 'jobDetail.host-event.json'){ - codeMirror('#HostEvent-json', $scope.json); + initCodeMirror('#HostEvent-json', $scope.json); } try { $scope.stdout = JobDetailService - .processJson($scope.event.event_data.res); + .processJson($scope.event.event_data.res.stdout); if ($state.current.name === 'jobDetail.host-event.stdout'){ - codeMirror('#HostEvent-stdout', $scope.stdout); + initCodeMirror('#HostEvent-stdout', $scope.stdout); } } catch(err){ - $scope.sdout = null; + $scope.stdout = null; } + /* jshint ignore:end */ $('#HostEvent').modal('show'); }; init(); diff --git a/awx/ui/client/src/job-detail/host-event/host-event.route.js b/awx/ui/client/src/job-detail/host-event/host-event.route.js index c1e14bd91a..6ba3b54626 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event.route.js +++ b/awx/ui/client/src/job-detail/host-event/host-event.route.js @@ -11,6 +11,7 @@ var hostEventModal = { url: '/task/:taskId/host-event/:eventId', controller: 'HostEventController', templateUrl: templateUrl('job-detail/host-event/host-event-modal'), + abtract: true, resolve: { hostEvent: ['JobDetailService','$stateParams', function(JobDetailService, $stateParams) { return JobDetailService.getRelatedJobEvents($stateParams.id, { @@ -32,7 +33,7 @@ var hostEventModal = { name: 'jobDetail.host-event.details', url: '/details', controller: 'HostEventController', - templateUrl: templateUrl('job-detail/host-event/host-event-details'), + templateUrl: templateUrl('job-detail/host-event/host-event-details') }; var hostEventJson = { @@ -42,11 +43,4 @@ var hostEventModal = { templateUrl: templateUrl('job-detail/host-event/host-event-json') }; - var hostEventStdout = { - name: 'jobDetail.host-event.stdout', - url: '/stdout', - controller: 'HostEventController', - templateUrl: templateUrl('job-detail/host-event/host-event-stdout') - }; - - export {hostEventDetails, hostEventJson, hostEventStdout, hostEventModal}; + export {hostEventDetails, hostEventJson, hostEventModal}; diff --git a/awx/ui/client/src/job-detail/host-event/main.js b/awx/ui/client/src/job-detail/host-event/main.js index 0670181f09..a24bbdd5ae 100644 --- a/awx/ui/client/src/job-detail/host-event/main.js +++ b/awx/ui/client/src/job-detail/host-event/main.js @@ -5,7 +5,7 @@ *************************************************/ import {hostEventModal, hostEventDetails, - hostEventJson, hostEventStdout} from './host-event.route'; + hostEventJson} from './host-event.route'; import controller from './host-event.controller'; export default @@ -16,5 +16,4 @@ $stateExtender.addState(hostEventModal); $stateExtender.addState(hostEventDetails); $stateExtender.addState(hostEventJson); - $stateExtender.addState(hostEventStdout); - }]); \ No newline at end of file + }]); diff --git a/awx/ui/client/src/job-detail/host-events/host-events.block.less b/awx/ui/client/src/job-detail/host-events/host-events.block.less index f5e4137059..7923b24a7b 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.block.less +++ b/awx/ui/client/src/job-detail/host-events/host-events.block.less @@ -9,6 +9,17 @@ margin-top: 0px; padding-top: 5px; } +button.HostEvents-close{ + width: 70px; + color: #FFFFFF; + text-transform: uppercase; + padding-left: 15px; + padding-right: 15px; + background-color: @default-link; + &:hover{ + background-color: @default-link-hov; + } +} .HostEvents-status--ok{ color: @green; } @@ -28,9 +39,6 @@ max-width: 420px; display: inline-block; } -.HostEvents-close{ - width: 70px; -} .HostEvents-filter--form{ padding-top: 15px; padding-bottom: 15px; diff --git a/awx/ui/client/src/job-detail/host-events/host-events.partial.html b/awx/ui/client/src/job-detail/host-events/host-events.partial.html index 7fb46f3234..0234712e8e 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.partial.html +++ b/awx/ui/client/src/job-detail/host-events/host-events.partial.html @@ -1,11 +1,11 @@