fixed smartstatus order

This commit is contained in:
John Mitchell
2015-06-05 17:00:35 -04:00
parent e471798918
commit c97ca6031f
2 changed files with 9 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ export default ['$scope', '$filter',
} }
var sparkData = var sparkData =
recentJobs.map(function(job) { _.sortBy(recentJobs.map(function(job) {
var data = {}; var data = {};
@@ -28,10 +28,10 @@ export default ['$scope', '$filter',
data.jobId = job.id; data.jobId = job.id;
data.smartStatus = job.status; data.smartStatus = job.status;
data.finished = $filter('longDate')(job.finished); data.finished = $filter('longDate')(job.finished) || "running";
return data; return data;
}); }), "finished").reverse();
$scope.sparkArray = _.pluck(sparkData, 'value'); $scope.sparkArray = _.pluck(sparkData, 'value');
$scope.jobIds = _.pluck(sparkData, 'jobId'); $scope.jobIds = _.pluck(sparkData, 'jobId');

View File

@@ -18,10 +18,13 @@ export default [ function() {
//capitalize first letter //capitalize first letter
if (status) { if (status) {
status = status.charAt(0).toUpperCase() + status.slice(1); status = status.charAt(0).toUpperCase() + status.slice(1);
return "<div class=\"smart-status-tooltip\">Job ID: " + var tooltip = "<div class=\"smart-status-tooltip\">Job ID: " +
options.userOptions.tooltipValueLookups.jobs[point.offset] + options.userOptions.tooltipValueLookups.jobs[point.offset] +
"<br>Status: <span style=\"color: " + point.color + "\">&#9679;</span>"+status+ "<br>Status: <span style=\"color: " + point.color + "\">&#9679;</span>"+status;
"<br>Finished: " + finished +"</div>" ; if (finished !== "running") {
tooltip += "<br>Finished: " + finished +"</div>" ;
}
return tooltip;
} }
}; };