Jobs list on Job Templates detail page now closely matches the Jobs tab. Status looks the same, is clickable and offers matching tooltip.

This commit is contained in:
Chris Houseknecht
2013-11-05 22:28:31 +00:00
parent e701857594
commit 1497d128f3
4 changed files with 49 additions and 22 deletions
+6 -11
View File
@@ -34,23 +34,18 @@ function JobsListCtrl ($scope, $rootScope, $location, $log, $routeParams, Rest,
scope[ngc] = "";
});
if (scope[list.name]) {
// Convert created date to local time zone
if (scope['jobs'] && scope['jobs'].length) {
var cDate;
for (var i=0; i < scope[list.name].length; i++) {
cDate = new Date(scope[list.name][i].created);
scope[list.name][i].created = FormatDate(cDate);
}
}
if (scope.jobs && scope.jobs.length) {
for (var i=0; i < scope.jobs.length; i++) {
for (var i=0; i < scope['jobs'].length; i++) {
// Convert created date to local time zone
cDate = new Date(scope['jobs'][i].created);
scope['jobs'][i].created = FormatDate(cDate);
// Set tooltip and link
scope.jobs[i].statusBadgeToolTip = JobStatusToolTip(scope.jobs[i].status) +
" Click to view status details.";
scope.jobs[i].statusLinkTo = '/#/jobs/' + scope.jobs[i].id;
}
}
});