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

adding badge for indicating a job was launched by a workflow

on the jobs list and the job results page
This commit is contained in:
jaredevantabor 2016-11-29 17:16:35 -08:00
parent 9dcd6d52af
commit e53509520f
4 changed files with 40 additions and 1 deletions

View File

@ -2222,3 +2222,18 @@ a:hover {
.modal-body .alert {
padding: 10px;
}
.WorkflowBadge{
background-color: @b7grey;
border-radius: 10px;
color: @default-bg;
display: inline-block;
font-family: 'Open Sans';
font-weight: bold;
font-style: normal;
font-size: x-small;
height: 14px;
margin-left: 5px;
padding-left: 2px;
width: 14px;
}

View File

@ -97,6 +97,15 @@
data-placement="top">
{{ job.summary_fields.job_template.name }}
</a>
<a href="{{ workflow_result_link }}"
aw-tool-tip="View workflow results"
data-placement="top"
data-original-title="" title="">
<i class="WorkflowBadge"
ng-show="job.launch_type === 'workflow' ">
W
</i>
</a>
</div>
</div>

View File

@ -41,6 +41,17 @@ export default
label: 'Name',
columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-6',
ngClick: "viewJobDetails(job)",
badgePlacement: 'right',
badgeCustom: true,
badgeIcon: `<a href="{{ workflow_result_link }}"
aw-tool-tip="View workflow results"
data-placement="top"
data-original-title="" title="">
<i class="WorkflowBadge"
ng-show="job.launch_type === 'workflow' ">
W
</i>
</a>`
},
type: {
label: 'Type',

View File

@ -327,7 +327,11 @@ angular.module('GeneratorHelpers', [systemStatus.name])
}
html += "\n";
}
} else {
}
else if(field.badgeCustom === true){
html += field.badgeIcon;
}
else {
if (field.badgeToolTip) {
html += "<a ";
html += (field.badgeNgHref) ? "ng-href=\"" + field.badgeNgHref + "\" " : "href=\"\"";