mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 22:49:32 -02:30
Job Submission cleanup
removed some commented code from the fix for the job submission from yesterday
This commit is contained in:
@@ -119,41 +119,11 @@ function PortalController($scope, $compile, $routeParams, $rootScope, $location,
|
|||||||
$('.list-well:eq(1)').css('margin-top' , '0px');
|
$('.list-well:eq(1)').css('margin-top' , '0px');
|
||||||
});
|
});
|
||||||
|
|
||||||
function processEvent(event) {
|
|
||||||
switch(event.status) {
|
|
||||||
case 'running':
|
|
||||||
jobs_scope.search('portal_job');
|
|
||||||
// queued_scope.search('queued_job');
|
|
||||||
break;
|
|
||||||
case 'new':
|
|
||||||
case 'pending':
|
|
||||||
jobs_scope.search('portal_job');
|
|
||||||
break;
|
|
||||||
case 'waiting':
|
|
||||||
jobs_scope.search('portal_job');
|
|
||||||
// completed_scope.search('completed_job');
|
|
||||||
break;
|
|
||||||
case 'successful':
|
|
||||||
// // console.log('successful');
|
|
||||||
// running_scope.search('running_job');
|
|
||||||
// completed_scope.search('completed_job');
|
|
||||||
// break;
|
|
||||||
case 'failed':
|
|
||||||
case 'error':
|
|
||||||
case 'canceled':
|
|
||||||
jobs_scope.search('portal_job');
|
|
||||||
// running_scope.search('running_job');
|
|
||||||
// queued_scope.search('queued_job');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($rootScope.removeJobStatusChange) {
|
if ($rootScope.removeJobStatusChange) {
|
||||||
$rootScope.removeJobStatusChange();
|
$rootScope.removeJobStatusChange();
|
||||||
}
|
}
|
||||||
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange', function(e, event) {
|
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange', function() {
|
||||||
// jobs_scope.search('portal_job');
|
jobs_scope.search('portal_job'); //processEvent(event);
|
||||||
processEvent(event);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.submitJob = function (id) {
|
$scope.submitJob = function (id) {
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
|
|||||||
$('#password-modal').dialog('close');
|
$('#password-modal').dialog('close');
|
||||||
}
|
}
|
||||||
scope.$emit(callback, data);
|
scope.$emit(callback, data);
|
||||||
// scope.$destroy();
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||||
|
|||||||
@@ -19,23 +19,11 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
|
|||||||
choicesCount = 0,
|
choicesCount = 0,
|
||||||
listCount = 0,
|
listCount = 0,
|
||||||
jobs_scope = scope.$new(true),
|
jobs_scope = scope.$new(true),
|
||||||
// completed_scope = scope.$new(true),
|
|
||||||
// running_scope = scope.$new(true),
|
|
||||||
// queued_scope = scope.$new(true),
|
|
||||||
// scheduled_scope = scope.$new(true),
|
|
||||||
max_rows,
|
max_rows,
|
||||||
html, e;
|
html, e;
|
||||||
|
|
||||||
html = '';
|
html = '';
|
||||||
html += "<div class=\"portal-job-template-container\">\n";
|
html += "<div class=\"portal-job-template-container\">\n";
|
||||||
// html+= "<span id='portal-job-template-header'>Job Templates </span>";
|
|
||||||
// html += "<ul id=\"job_status_tabs\" class=\"nav nav-tabs\">\n";
|
|
||||||
// html += "<li class=\"active\"><a id=\"active_jobs_link\" ng-click=\"toggleTab($event, 'active_jobs_link', 'job_status_tabs')\"\n";
|
|
||||||
// html += " href=\"#active-jobs-tab\" data-toggle=\"tab\">Jobs</a></li>\n";
|
|
||||||
// html += "<li><a id=\"scheduled_jobs_link\" ng-click=\"toggleTab($event, 'scheduled_jobs_link', 'job_status_tabs')\"\n";
|
|
||||||
// html += "href=\"#scheduled-jobs-tab\" data-toggle=\"tab\">Schedule</a></li>\n";
|
|
||||||
// html += "</ul>\n";
|
|
||||||
// html += "<div id=\"portal-job-template-tab-content\" class=\"tab-content \">\n";
|
|
||||||
html += "<div class=\"tab-pane active\" id=\"active-jobs-tab\">\n";
|
html += "<div class=\"tab-pane active\" id=\"active-jobs-tab\">\n";
|
||||||
html += "<div class=\"row search-row\" id='portal-job-template-search'>\n";
|
html += "<div class=\"row search-row\" id='portal-job-template-search'>\n";
|
||||||
html += "<div class=\"col-lg-6 col-md-6\" id=\"active-jobs-search-container\"></div>\n";
|
html += "<div class=\"col-lg-6 col-md-6\" id=\"active-jobs-search-container\"></div>\n";
|
||||||
@@ -44,8 +32,6 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
|
|||||||
html += "<div id=\"active-jobs\" class=\"job-list-target\"></div>\n";
|
html += "<div id=\"active-jobs\" class=\"job-list-target\"></div>\n";
|
||||||
html += "</div>\n"; //list
|
html += "</div>\n"; //list
|
||||||
html += "</div>\n"; //active-jobs-tab
|
html += "</div>\n"; //active-jobs-tab
|
||||||
// html += "<div class=\"tab-pane\" id=\"scheduled-jobs-tab\"></div>\n";
|
|
||||||
// html += "</div>\n"; // jobs-list-container
|
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
|
|
||||||
e = angular.element(document.getElementById(target));
|
e = angular.element(document.getElementById(target));
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
|
|||||||
$rootScope.sessionExpired = false;
|
$rootScope.sessionExpired = false;
|
||||||
$rootScope.token = null;
|
$rootScope.token = null;
|
||||||
$rootScope.token_expires = null;
|
$rootScope.token_expires = null;
|
||||||
|
|
||||||
$rootScope.login_username = null;
|
$rootScope.login_username = null;
|
||||||
$rootScope.login_password = null;
|
$rootScope.login_password = null;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user