mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
Merge pull request #7145 from mabashian/6910-recent-job-link
Fixed host jobs summary links
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessErrors',
|
export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessErrors', '$state',
|
||||||
function($scope, Empty, Wait, GetBasePath, Rest, ProcessErrors) {
|
function($scope, Empty, Wait, GetBasePath, Rest, ProcessErrors, $state) {
|
||||||
|
|
||||||
$scope.gatherRecentJobs = function(event) {
|
$scope.gatherRecentJobs = function(event) {
|
||||||
if (!Empty($scope.inventory.id)) {
|
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) {
|
data.results.forEach(function(row) {
|
||||||
html += "<tr>\n";
|
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";
|
". 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>" + ($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>";
|
". Click for details\" aw-tip-placement=\"top\">" + $filter('sanitize')(ellipsis(row.name)) + "</a></td>";
|
||||||
html += "</tr>\n";
|
html += "</tr>\n";
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user