Fixed host jobs summary links

This commit is contained in:
Michael Abashian 2017-07-18 15:49:51 -04:00
parent e1e1f5d15f
commit 565c6f6e3e
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessErrors',
function($scope, Empty, Wait, GetBasePath, Rest, ProcessErrors) {
export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessErrors', '$state',
function($scope, Empty, Wait, GetBasePath, Rest, ProcessErrors, $state) {
$scope.gatherRecentJobs = function(event) {
if (!Empty($scope.inventory.id)) {
@ -22,5 +22,9 @@ export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessError
}
};
$scope.viewJob = function(jobId) {
$state.go('jobResult', {id: jobId});
};
}
];

View File

@ -59,10 +59,10 @@ export default ['templateUrl', 'Wait', '$filter', '$compile', 'i18n',
data.results.forEach(function(row) {
html += "<tr>\n";
html += "<td><a href=\"#/jobs/" + row.id + "\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
html += "<td><a href=\"\" ng-click=\"viewJob(" + row.id + ")\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\"><i class=\"fa SmartStatus-tooltip--" + row.status + " icon-job-" + row.status + "\"></i></a></td>\n";
html += "<td>" + ($filter('longDate')(row.finished)) + "</td>";
html += "<td><a href=\"#/jobs/" + row.id + "\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
html += "<td><a href=\"\" ng-click=\"viewJob(" + row.id + ")\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\">" + $filter('sanitize')(ellipsis(row.name)) + "</a></td>";
html += "</tr>\n";
});