mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Merge pull request #7145 from mabashian/6910-recent-job-link
Fixed host jobs summary links
This commit is contained in:
commit
7bdb092b80
@ -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});
|
||||
};
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
@ -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";
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user