mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
AC-692 status button is now displaying once again on jobs detail page.
This commit is contained in:
@@ -182,7 +182,8 @@ JobsListCtrl.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routePar
|
|||||||
function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, JobForm,
|
function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, JobForm,
|
||||||
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit,
|
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit,
|
||||||
RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList, CredentialList,
|
RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList, CredentialList,
|
||||||
ProjectList, LookUpInit, PromptPasswords, GetBasePath, md5Setup, FormatDate, JobStatusToolTip)
|
ProjectList, LookUpInit, PromptPasswords, GetBasePath, md5Setup, FormatDate,
|
||||||
|
JobStatusToolTip, Wait)
|
||||||
{
|
{
|
||||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||||
//scope.
|
//scope.
|
||||||
@@ -505,7 +506,7 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
|
|||||||
}
|
}
|
||||||
|
|
||||||
scope.refresh = function() {
|
scope.refresh = function() {
|
||||||
scope.statusSearchSpin = true;
|
Wait('start');
|
||||||
Rest.setUrl(defaultUrl + id + '/');
|
Rest.setUrl(defaultUrl + id + '/');
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success( function(data, status, headers, config) {
|
.success( function(data, status, headers, config) {
|
||||||
@@ -514,14 +515,10 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
|
|||||||
scope.result_traceback = data.result_traceback;
|
scope.result_traceback = data.result_traceback;
|
||||||
scope['stdout_rows'] = calcRows(scope['result_stdout']);
|
scope['stdout_rows'] = calcRows(scope['result_stdout']);
|
||||||
scope['traceback_rows'] = calcRows(scope['result_traceback']);
|
scope['traceback_rows'] = calcRows(scope['result_traceback']);
|
||||||
if (!(data.status == 'pending' || data.status == 'waiting' || data.status == 'running')) {
|
Wait('stop');
|
||||||
if ($rootScope.timer) {
|
|
||||||
clearInterval($rootScope.timer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scope.statusSearchSpin = false;
|
|
||||||
})
|
})
|
||||||
.error( function(data, status, headers, config) {
|
.error( function(data, status, headers, config) {
|
||||||
|
Wait('stop');
|
||||||
ProcessErrors(scope, data, status, null,
|
ProcessErrors(scope, data, status, null,
|
||||||
{ hdr: 'Error!', msg: 'Attempt to load job failed. GET returned status: ' + status });
|
{ hdr: 'Error!', msg: 'Attempt to load job failed. GET returned status: ' + status });
|
||||||
});
|
});
|
||||||
@@ -540,5 +537,5 @@ JobsEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$
|
|||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit',
|
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit',
|
||||||
'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList',
|
'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList',
|
||||||
'ProjectList', 'LookUpInit', 'PromptPasswords', 'GetBasePath', 'md5Setup', 'FormatDate',
|
'ProjectList', 'LookUpInit', 'PromptPasswords', 'GetBasePath', 'md5Setup', 'FormatDate',
|
||||||
'JobStatusToolTip'
|
'JobStatusToolTip', 'Wait'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -334,8 +334,9 @@ angular.module('JobFormDefinition', [])
|
|||||||
refresh: {
|
refresh: {
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
icon: "icon-refresh",
|
icon: "icon-refresh",
|
||||||
|
iconSize: 'large',
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
ngShow: "job_status == 'pending' || job_status == 'waiting' || job_status == 'running'",
|
//ngShow: "job_status == 'pending' || job_status == 'waiting' || job_status == 'running'",
|
||||||
'class': 'btn-xs btn-primary',
|
'class': 'btn-xs btn-primary',
|
||||||
awToolTip: "Refresh the page",
|
awToolTip: "Refresh the page",
|
||||||
ngClick: "refresh()"
|
ngClick: "refresh()"
|
||||||
|
|||||||
Reference in New Issue
Block a user