From c6e32cde35507022ad172eb2ee929b5a42fc4ac3 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Tue, 21 May 2013 03:12:25 -0400 Subject: [PATCH] Added refresh button to jobs list page --- lib/ui/static/js/controllers/Jobs.js | 4 ++++ lib/ui/static/js/lists/Jobs.js | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/ui/static/js/controllers/Jobs.js b/lib/ui/static/js/controllers/Jobs.js index 4582f01f36..838533e3f5 100644 --- a/lib/ui/static/js/controllers/Jobs.js +++ b/lib/ui/static/js/controllers/Jobs.js @@ -28,6 +28,10 @@ function JobsListCtrl ($scope, $rootScope, $location, $log, $routeParams, Rest, LoadBreadCrumbs(); + scope.refreshJob = function() { + scope.search(list.iterator); + } + scope.editJob = function(id) { $location.path($location.path() + '/' + id); } diff --git a/lib/ui/static/js/lists/Jobs.js b/lib/ui/static/js/lists/Jobs.js index 9c877b1177..917a3a100e 100644 --- a/lib/ui/static/js/lists/Jobs.js +++ b/lib/ui/static/js/lists/Jobs.js @@ -40,7 +40,13 @@ angular.module('JobsListDefinition', []) }, actions: { - }, + refresh: { + ngClick: "refreshJob(\{\{ job.id \}\})", + icon: 'icon-refresh', + awToolTip: 'Refresh the page', + mode: 'all' + } + }, fieldActions: { edit: { @@ -73,7 +79,7 @@ angular.module('JobsListDefinition', []) ngClick: 'deleteJob(\{\{ job.id \}\})', class: 'btn-danger btn-mini', awToolTip: 'Cancel job', - ngDisabled: "job.status == 'error' || job.status == 'failed'" + ngDisabled: "job.status == 'error' || job.status == 'failed' || job.status == 'success'" } } });