mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 10:40:01 -03:30
UI update to check recent job type for routing to detail pages.
This commit is contained in:
@@ -21,20 +21,17 @@ export default ['$scope', '$filter', 'i18n',
|
|||||||
return;
|
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 =
|
var sparkData =
|
||||||
_.sortBy(recentJobs.map(function(job) {
|
_.sortBy(recentJobs.map(function(job) {
|
||||||
|
|
||||||
const finished = $filter('longDate')(job.finished) || job.status+"";
|
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 = {
|
const data = {
|
||||||
status: job.status,
|
status: job.status,
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user