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

Adding project updates to job details, along w/ revision

This includes adding a status icon to the job results page
and updating the status via the socket messages. Also includes
adding the revision to the projects list
This commit is contained in:
jaredevantabor 2016-11-21 13:19:50 -08:00
parent 3b88e8e0b7
commit 7534e16d22
5 changed files with 42 additions and 0 deletions

View File

@ -328,6 +328,10 @@ table, tbody {
padding-left: 10px!important;
}
.List-staticColumnAdjacent--monospace {
font-family: monospace;
}
.List-titleLockup {
margin-left: 4px;
margin-right: 6px;

View File

@ -94,6 +94,10 @@
width: 100%;
}
.JobResults-resultRowText--revision{
font-family: monospace;
}
.JobResults-statusResultIcon {
padding-left: 0px;
padding-right: 10px;

View File

@ -46,6 +46,12 @@ export default ['jobData', 'jobDataOptions', 'jobLabels', 'jobFinished', 'count'
$scope.jobOptions = jobDataOptions.actions.GET;
$scope.labels = jobLabels;
$scope.jobFinished = jobFinished;
if(jobData.summary_fields.project_update && jobData.summary_fields.project_update.status){
$scope.project_status = jobData.summary_fields.project_update.status;
}
if(jobData.summary_fields.project_update && jobData.summary_fields.project_update.id){
$scope.project_update_link = `/#/scm_update/${jobData.summary_fields.project_update.id}`;
}
// turn related api browser routes into tower routes
getTowerLinks();
@ -198,5 +204,9 @@ export default ['jobData', 'jobDataOptions', 'jobLabels', 'jobFinished', 'count'
if (parseInt(data.unified_job_id, 10) === parseInt($scope.job.id,10)) {
$scope.job.status = data.status;
}
if (parseInt(data.project_id, 10) === parseInt($scope.job.project,10)) {
$scope.project_status = data.status;
$scope.project_update_link = `/#/scm_update/${data.unified_job_id}`;
}
});
}];

View File

@ -148,6 +148,13 @@
Project
</label>
<div class="JobResults-resultRowText">
<a href="{{ project_update_link }}"
aw-tool-tip="View project sync results"
data-placement="top">
<i class="JobResults-statusResultIcon
fa icon-job-{{ project_status }}">
</i>
</a>
<a href="{{ project_link }}"
aw-tool-tip="Edit the project"
data-placement="top">
@ -156,6 +163,17 @@
</div>
</div>
<!-- REVISION DETAIL -->
<div class="JobResults-resultRow"
ng-show="job.scm_revision">
<label class="JobResults-resultRowLabel">
Revision
</label>
<div class="JobResults-resultRowText JobResults-resultRowText--revision">
{{ job.scm_revision }}
</div>
</div>
<!-- PLAYBOOK DETAIL -->
<div class="JobResults-resultRow"
ng-show="job.playbook">

View File

@ -38,6 +38,12 @@ export default
columnClass: "col-lg-4 col-md-4 col-sm-5 col-xs-7 List-staticColumnAdjacent",
modalColumnClass: 'col-md-8'
},
scm_revision: {
label: i18n._('Revision'),
excludeModal: true,
columnClass: 'col-lg-3 col-md-2 col-sm-3 hidden-xs',
class: 'List-staticColumnAdjacent--monospace'
},
scm_type: {
label: i18n._('Type'),
excludeModal: true,