Job Submission cleanup

removed some commented code from the fix for the job submission from yesterday
This commit is contained in:
Jared Tabor 2014-11-06 14:28:18 -05:00
parent cacdefafbf
commit fd8908f7dc
4 changed files with 2 additions and 48 deletions

View File

@ -119,41 +119,11 @@ function PortalController($scope, $compile, $routeParams, $rootScope, $location,
$('.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) {
$rootScope.removeJobStatusChange();
}
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange', function(e, event) {
// jobs_scope.search('portal_job');
processEvent(event);
$rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange', function() {
jobs_scope.search('portal_job'); //processEvent(event);
});
$scope.submitJob = function (id) {

View File

@ -53,7 +53,6 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
$('#password-modal').dialog('close');
}
scope.$emit(callback, data);
// scope.$destroy();
})
.error(function(data, status) {
ProcessErrors(scope, data, status, null, { hdr: 'Error!',

View File

@ -19,23 +19,11 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
choicesCount = 0,
listCount = 0,
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,
html, e;
html = '';
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=\"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";
@ -44,8 +32,6 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
html += "<div id=\"active-jobs\" class=\"job-list-target\"></div>\n";
html += "</div>\n"; //list
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";
e = angular.element(document.getElementById(target));

View File

@ -84,7 +84,6 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
$rootScope.sessionExpired = false;
$rootScope.token = null;
$rootScope.token_expires = null;
$rootScope.login_username = null;
$rootScope.login_password = null;
},