mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
Merge pull request #4166 from jaredevantabor/job-results-labels
Job Labels should be collapsible
This commit is contained in:
@@ -2222,3 +2222,18 @@ a:hover {
|
|||||||
.modal-body .alert {
|
.modal-body .alert {
|
||||||
padding: 10px;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -94,6 +94,15 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.JobResults-expandArrow {
|
||||||
|
color: #D7D7D7;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.JobResults-resultRowText--revision{
|
.JobResults-resultRowText--revision{
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,18 @@ export default ['jobData', 'jobDataOptions', 'jobLabels', 'jobFinished', 'count'
|
|||||||
jobResultsService.relaunchJob($scope);
|
jobResultsService.relaunchJob($scope);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.lessLabels = false;
|
||||||
|
$scope.toggleLessLabels = function() {
|
||||||
|
if (!$scope.lessLabels) {
|
||||||
|
$('#job-results-labels').slideUp(200);
|
||||||
|
$scope.lessLabels = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#job-results-labels').slideDown(200);
|
||||||
|
$scope.lessLabels = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// get initial count from resolve
|
// get initial count from resolve
|
||||||
$scope.count = count.val;
|
$scope.count = count.val;
|
||||||
$scope.hostCount = getTotalHostCount(count.val);
|
$scope.hostCount = getTotalHostCount(count.val);
|
||||||
|
|||||||
@@ -97,6 +97,15 @@
|
|||||||
data-placement="top">
|
data-placement="top">
|
||||||
{{ job.summary_fields.job_template.name }}
|
{{ job.summary_fields.job_template.name }}
|
||||||
</a>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -305,11 +314,27 @@
|
|||||||
<!-- LABELS DETAIL -->
|
<!-- LABELS DETAIL -->
|
||||||
<div class="JobResults-resultRow"
|
<div class="JobResults-resultRow"
|
||||||
ng-show="labels && labels.length > 0">
|
ng-show="labels && labels.length > 0">
|
||||||
<label class="JobResults-resultRowLabel
|
<div class="JobResults-resultRow">
|
||||||
JobResults-resultRowLabel--fullWidth">
|
<a class="JobResults-resultRowLabel
|
||||||
Labels
|
JobResults-resultRowLabel--fullWidth"
|
||||||
</label>
|
ng-show="lessLabels"
|
||||||
<div class="LabelList
|
href=""
|
||||||
|
ng-click="toggleLessLabels()">
|
||||||
|
Labels
|
||||||
|
<i class="JobResults-expandArrow
|
||||||
|
fa fa-caret-right"></i>
|
||||||
|
</a>
|
||||||
|
<a class="JobResults-resultRowLabel
|
||||||
|
JobResults-resultRowLabel--fullWidth"
|
||||||
|
ng-show="!lessLabels"
|
||||||
|
href=""
|
||||||
|
ng-click="toggleLessLabels()">
|
||||||
|
Labels
|
||||||
|
<i class="JobResults-expandArrow
|
||||||
|
fa fa-caret-down"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="job-results-labels" class="LabelList
|
||||||
JobResults-resultRowText
|
JobResults-resultRowText
|
||||||
JobResults-resultRowText--fullWidth">
|
JobResults-resultRowText--fullWidth">
|
||||||
<div ng-repeat="label in labels"
|
<div ng-repeat="label in labels"
|
||||||
|
|||||||
@@ -41,6 +41,17 @@ export default
|
|||||||
label: 'Name',
|
label: 'Name',
|
||||||
columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-6',
|
columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-6',
|
||||||
ngClick: "viewJobDetails(job)",
|
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: {
|
type: {
|
||||||
label: 'Type',
|
label: 'Type',
|
||||||
|
|||||||
@@ -327,7 +327,11 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
}
|
}
|
||||||
html += "\n";
|
html += "\n";
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else if(field.badgeCustom === true){
|
||||||
|
html += field.badgeIcon;
|
||||||
|
}
|
||||||
|
else {
|
||||||
if (field.badgeToolTip) {
|
if (field.badgeToolTip) {
|
||||||
html += "<a ";
|
html += "<a ";
|
||||||
html += (field.badgeNgHref) ? "ng-href=\"" + field.badgeNgHref + "\" " : "href=\"\"";
|
html += (field.badgeNgHref) ? "ng-href=\"" + field.badgeNgHref + "\" " : "href=\"\"";
|
||||||
|
|||||||
Reference in New Issue
Block a user