Added refresh button to jobs list page

This commit is contained in:
chouseknecht
2013-05-21 03:12:25 -04:00
parent 8343d20c60
commit c6e32cde35
2 changed files with 12 additions and 2 deletions

View File

@@ -28,6 +28,10 @@ function JobsListCtrl ($scope, $rootScope, $location, $log, $routeParams, Rest,
LoadBreadCrumbs(); LoadBreadCrumbs();
scope.refreshJob = function() {
scope.search(list.iterator);
}
scope.editJob = function(id) { scope.editJob = function(id) {
$location.path($location.path() + '/' + id); $location.path($location.path() + '/' + id);
} }

View File

@@ -40,7 +40,13 @@ angular.module('JobsListDefinition', [])
}, },
actions: { actions: {
}, refresh: {
ngClick: "refreshJob(\{\{ job.id \}\})",
icon: 'icon-refresh',
awToolTip: 'Refresh the page',
mode: 'all'
}
},
fieldActions: { fieldActions: {
edit: { edit: {
@@ -73,7 +79,7 @@ angular.module('JobsListDefinition', [])
ngClick: 'deleteJob(\{\{ job.id \}\})', ngClick: 'deleteJob(\{\{ job.id \}\})',
class: 'btn-danger btn-mini', class: 'btn-danger btn-mini',
awToolTip: 'Cancel job', awToolTip: 'Cancel job',
ngDisabled: "job.status == 'error' || job.status == 'failed'" ngDisabled: "job.status == 'error' || job.status == 'failed' || job.status == 'success'"
} }
} }
}); });