AC-331 final clean up

This commit is contained in:
chouseknecht
2013-08-22 11:26:23 -04:00
parent f8b186b24a
commit 4ea3c23e5a
6 changed files with 57 additions and 29 deletions

View File

@@ -77,6 +77,10 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
scope.viewJobs = function(id) {
$location.url('/jobs/?inventory__int=' + id + '&order_by=status');
}
scope.viewFailedJobs = function(id) {
$location.url('/jobs/?inventory__int=' + id + '&status=failed&order_by=status');
}
}
InventoriesList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'InventoryList', 'GenerateList',
@@ -482,11 +486,10 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
HostsDelete({ scope: scope, "inventory_id": id, group_id: scope.group_id, host_id: host_id, host_name: host_name,
request: 'delete' });
}
/* scope.removeHost = function(host_id, host_name) {
HostsDelete({ scope: scope, "inventory_id": id, group_id: scope.group_id, host_id: host_id, host_name: host_name,
request: 'remove' });
} */
scope.viewJobs = function(last_job) {
$location.url('/jobs/?id__int=' + last_job );
}
scope.viewLastEvents = function(host_id, last_job, host_name, last_job_name) {
// Choose View-> Latest job events

View File

@@ -50,6 +50,11 @@ function JobsListCtrl ($scope, $rootScope, $location, $log, $routeParams, Rest,
scope[list.iterator + 'SearchValue'] = $routeParams['inventory__int'];
scope[list.iterator + 'SearchFieldLabel'] = 'Inventory ID';
}
if ($routeParams['id__int']) {
scope[list.iterator + 'SearchField'] = 'id';
scope[list.iterator + 'SearchValue'] = $routeParams['id__int'];
scope[list.iterator + 'SearchFieldLabel'] = 'Job ID';
}
scope.search(list.iterator);
// Called from Inventories page, failed jobs link. Now sort by status so faild jobs appear at top of list