mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Merge pull request #994 from mabashian/stdout-results
Added standard out details to inventory sync, management jobs and scm updates
This commit is contained in:
commit
fffa590a82
@ -8,6 +8,15 @@
|
||||
</div>
|
||||
<div class="StandardOut-details">
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="inventory_source_name">
|
||||
<div class="StandardOut-detailsLabel">NAME</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
<a href="/#/home/groups/?id={{ group }}">
|
||||
{{ inventory_source_name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow">
|
||||
<div class="StandardOut-detailsLabel">STATUS</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
@ -16,6 +25,87 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="{{job.license_error !== null}}">
|
||||
<div class="StandardOut-detailsLabel">LICENSE ERROR</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.license_error }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.started">
|
||||
<div class="StandardOut-detailsLabel">STARTED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.started | date:'MM/dd/yy HH:mm:ss' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.finished">
|
||||
<div class="StandardOut-detailsLabel">FINISHED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.finished | date:'MM/dd/yy HH:mm:ss' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.finished">
|
||||
<div class="StandardOut-detailsLabel">ELAPSED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.elapsed }} seconds
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.launch_type">
|
||||
<div class="StandardOut-detailsLabel">LAUNCH TYPE</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.launch_type }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="credential_name">
|
||||
<div class="StandardOut-detailsLabel">CREDENTIAL</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
<a ui-sref="credentials.edit({credential_id: credential})">
|
||||
{{ credential_name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="inventory_source_name">
|
||||
<div class="StandardOut-detailsLabel">GROUP</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
<a href="/#/home/groups/?id={{ group }}">
|
||||
{{ inventory_source_name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="source">
|
||||
<div class="StandardOut-detailsLabel">SOURCE</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ source }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="source_regions">
|
||||
<div class="StandardOut-detailsLabel">REGIONS</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ source_regions }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="{{ job.overwrite !== null }}">
|
||||
<div class="StandardOut-detailsLabel">OVERWRITE</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.overwrite }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="{{ job.overwrite_vars !== null }}">
|
||||
<div class="StandardOut-detailsLabel">OVERWRITE VARS</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.overwrite_vars }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -8,6 +8,11 @@
|
||||
</div>
|
||||
<div class="StandardOut-details">
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.name">
|
||||
<div class="StandardOut-detailsLabel">NAME</div>
|
||||
<div class="StandardOut-detailsContent">{{ job.name }}</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow">
|
||||
<div class="StandardOut-detailsLabel">STATUS</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
@ -16,6 +21,43 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.started">
|
||||
<div class="StandardOut-detailsLabel">STARTED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.started | date:'MM/dd/yy HH:mm:ss' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.finished">
|
||||
<div class="StandardOut-detailsLabel">FINISHED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.finished | date:'MM/dd/yy HH:mm:ss' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.finished">
|
||||
<div class="StandardOut-detailsLabel">ELAPSED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.elapsed }} seconds
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.launch_type">
|
||||
<div class="StandardOut-detailsLabel">LAUNCH TYPE</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.launch_type }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TODO: figure out how to show the extra vars on different rows like the mockup -->
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.extra_vars">
|
||||
<div class="StandardOut-detailsLabel">EXTRA VARS</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.extra_vars }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -8,6 +8,15 @@
|
||||
</div>
|
||||
<div class="StandardOut-details">
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="project_name">
|
||||
<div class="StandardOut-detailsLabel">NAME</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
<a ui-sref="projects.edit({id: job.project})">
|
||||
{{ project_name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow">
|
||||
<div class="StandardOut-detailsLabel">STATUS</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
@ -16,6 +25,52 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.started">
|
||||
<div class="StandardOut-detailsLabel">STARTED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.started | date:'MM/dd/yy HH:mm:ss' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.finished">
|
||||
<div class="StandardOut-detailsLabel">FINISHED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.finished | date:'MM/dd/yy HH:mm:ss' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.finished">
|
||||
<div class="StandardOut-detailsLabel">ELAPSED</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.elapsed }} seconds
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="job.launch_type">
|
||||
<div class="StandardOut-detailsLabel">LAUNCH TYPE</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
{{ job.launch_type }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="project_name">
|
||||
<div class="StandardOut-detailsLabel">PROJECT</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
<a ui-sref="projects.edit({id: job.project})">
|
||||
{{ project_name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="StandardOut-detailsRow" ng-show="credential_name">
|
||||
<div class="StandardOut-detailsLabel">CREDENTIAL</div>
|
||||
<div class="StandardOut-detailsContent">
|
||||
<a ui-sref="credentials.edit({credential_id: credential})">
|
||||
{{ credential_name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export function JobStdoutController ($location, $log, $rootScope, $scope, $compile, $state, $stateParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, ModelToBasePathKey) {
|
||||
export function JobStdoutController ($location, $log, $rootScope, $scope, $compile, $state, $stateParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, ModelToBasePathKey, Empty, GetChoices, LookUpName) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -182,6 +182,78 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
|
||||
$scope.verbosity = data.verbosity;
|
||||
$scope.job_tags = data.job_tags;
|
||||
stdout_url = data.related.stdout;
|
||||
|
||||
// If we have a source then we have to go get the source choices from the server
|
||||
if (!Empty(data.source)) {
|
||||
if ($scope.removeChoicesReady) {
|
||||
$scope.removeChoicesReady();
|
||||
}
|
||||
$scope.removeChoicesReady = $scope.$on('ChoicesReady', function() {
|
||||
$scope.source_choices.every(function(e) {
|
||||
if (e.value === data.source) {
|
||||
$scope.source = e.label;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
// GetChoices can be found in the helper: LogViewer.js
|
||||
// It attaches the source choices to $scope.source_choices.
|
||||
// Then, when the callback is fired, $scope.source is bound
|
||||
// to the corresponding label.
|
||||
GetChoices({
|
||||
scope: $scope,
|
||||
url: GetBasePath('inventory_sources'),
|
||||
field: 'source',
|
||||
variable: 'source_choices',
|
||||
choice_name: 'choices',
|
||||
callback: 'ChoicesReady'
|
||||
});
|
||||
}
|
||||
|
||||
// LookUpName can be found in the helper: LogViewer.js
|
||||
// It attaches the name that it gets (based on the url)
|
||||
// to the $scope variable defined by the attribute scope_var.
|
||||
if (!Empty(data.credential)) {
|
||||
LookUpName({
|
||||
scope: $scope,
|
||||
scope_var: 'credential',
|
||||
url: GetBasePath('credentials') + data.credential + '/'
|
||||
});
|
||||
}
|
||||
|
||||
if (!Empty(data.inventory)) {
|
||||
LookUpName({
|
||||
scope: $scope,
|
||||
scope_var: 'inventory',
|
||||
url: GetBasePath('inventory') + data.inventory + '/'
|
||||
});
|
||||
}
|
||||
|
||||
if (!Empty(data.project)) {
|
||||
LookUpName({
|
||||
scope: $scope,
|
||||
scope_var: 'project',
|
||||
url: GetBasePath('projects') + data.project + '/'
|
||||
});
|
||||
}
|
||||
|
||||
if (!Empty(data.cloud_credential)) {
|
||||
LookUpName({
|
||||
scope: $scope,
|
||||
scope_var: 'cloud_credential',
|
||||
url: GetBasePath('credentials') + data.cloud_credential + '/'
|
||||
});
|
||||
}
|
||||
|
||||
if (!Empty(data.inventory_source)) {
|
||||
LookUpName({
|
||||
scope: $scope,
|
||||
scope_var: 'inventory_source',
|
||||
url: GetBasePath('inventory_sources') + data.inventory_source + '/'
|
||||
});
|
||||
}
|
||||
|
||||
// if (data.status === 'successful' || data.status === 'failed' || data.status === 'error' || data.status === 'canceled') {
|
||||
// live_event_processing = false;
|
||||
// if ($rootScope.jobStdOutInterval) {
|
||||
@ -281,4 +353,4 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
|
||||
|
||||
}
|
||||
|
||||
JobStdoutController.$inject = [ '$location', '$log', '$rootScope', '$scope', '$compile', '$state', '$stateParams', 'ClearScope', 'GetBasePath', 'Wait', 'Rest', 'ProcessErrors', 'ModelToBasePathKey'];
|
||||
JobStdoutController.$inject = [ '$location', '$log', '$rootScope', '$scope', '$compile', '$state', '$stateParams', 'ClearScope', 'GetBasePath', 'Wait', 'Rest', 'ProcessErrors', 'ModelToBasePathKey', 'Empty', 'GetChoices', 'LookUpName'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user