mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
UI update to check recent job type for routing to detail pages.
This commit is contained in:
parent
b763c51f8a
commit
2a62e300a2
@ -21,20 +21,17 @@ export default ['$scope', '$filter', 'i18n',
|
||||
return;
|
||||
}
|
||||
|
||||
// unless we explicitly define a value for the template-type attribute when invoking the
|
||||
// directive, assume the status icons are for a regular (non-workflow) job when building
|
||||
// the details url path
|
||||
if (typeof $scope.templateType !== 'undefined' && $scope.templateType === 'workflow_job_template') {
|
||||
detailsBaseUrl = '/#/workflows/';
|
||||
} else {
|
||||
detailsBaseUrl = '/#/jobs/playbook/';
|
||||
}
|
||||
|
||||
var sparkData =
|
||||
_.sortBy(recentJobs.map(function(job) {
|
||||
|
||||
const finished = $filter('longDate')(job.finished) || job.status+"";
|
||||
|
||||
// We now get the job type of recent jobs associated with a JT
|
||||
if (job.type === 'workflow job') {
|
||||
detailsBaseUrl = '/#/workflows/';
|
||||
} else if (job.type === 'job') {
|
||||
detailsBaseUrl = '/#/jobs/playbook/';
|
||||
}
|
||||
|
||||
const data = {
|
||||
status: job.status,
|
||||
jobId: job.id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user