1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

First pass at the right side of the new job details

This commit is contained in:
jaredevantabor 2016-09-21 13:10:57 -07:00
parent c7dfcbba5f
commit 43e4786c7f
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,19 @@
@import '../shared/branding/colors.less';
@import '../shared/branding/colors.default.less';
.JobResults-badgeTitle{
color: #707070;
font-size: 14px;
margin-right: 10px;
font-weight: normal;
text-transform: uppercase;
margin-left: 20px;
}
.JobResults-badgeRow{
display:flex;
align-items: center;
margin-right: 5px;
}

View File

@ -438,9 +438,34 @@
</div>
</div>
<!-- RIGHT PANE -->
<div class="JobDetail-rightSide">
<div class="JobDetail-stdoutPanel Panel">
<div class="StandardOut-panelHeader">
<div class="StandardOut-panelHeaderText">
<i class="JobDetail-statusIcon--results fa icon-job-{{ job_status.status }}"></i>
{{job.name}}
</div>
<div class="JobResults-badgeRow">
<div class="JobResults-badgeTitle">Plays</div><span class="badge List-titleBadge ng-binding">{{jobData.playCount || 0}}</span>
<div class="JobResults-badgeTitle">Tasks</div><span class="badge List-titleBadge ng-binding">{{jobData.taskCount || 0}}</span>
<div class="JobResults-badgeTitle">Hosts</div><span class="badge List-titleBadge ng-binding">{{jobData.hostCount || 0}}</span>
<div class="JobResults-badgeTitle">Elapsed</div><span class="badge List-titleBadge ng-binding">{{ job_status.elapsed || "00:00:01"}}</span>
</div>
<div class="StandardOut-panelHeaderActions">
<button class="StandardOut-actionButton" aw-tool-tip="Toggle Output" data-placement="top" ng-class="{'StandardOut-actionButton--active': stdoutFullScreen}" ng-click="toggleStdoutFullscreen()">
<i class="fa fa-arrows-alt"></i>
</button>
<a ng-show="job_status.status === 'failed' || job_status.status === 'successful' || job_status.status === 'canceled'" href="/api/v1/jobs/{{ job.id }}/stdout?format=txt_download&token={{ token }}">
<button class="StandardOut-actionButton" aw-tool-tip="Download Output" data-placement="top">
<i class="fa fa-download"></i>
</button>
</a>
</div>
</div>
<!-- <standard-out-log stdout-endpoint="job.related.stdout"></standard-out-log> -->
</div>
</div>
<!--END OF RIGHT PANE-->
</div>
</div>

View File

@ -116,6 +116,10 @@ export default {
$scope.job = jobData;
$scope.jobOptions = jobDataOptions.actions.GET;
$scope.labels = jobLabels;
$scope.stdoutFullScreen = false;
$scope.job_status = {"status": ""};
$scope.job_status.status = (jobData.status === 'waiting' || jobData.status === 'new') ? 'pending' : jobData.status;
// turn related api browser routes into tower routes
getTowerLinks();
@ -129,5 +133,10 @@ export default {
ParseTypeChange({ scope: $scope,
field_id: 'pre-formatted-variables',
readOnly: true });
// Click binding for the expand/collapse button on the standard out log
$scope.toggleStdoutFullscreen = function() {
$scope.stdoutFullScreen = !$scope.stdoutFullScreen;
};
}]
};