mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Merge pull request #2337 from Haokun-Chen/2096
show credential on job detail page for jobs besides JTs playbook job
This commit is contained in:
@@ -389,10 +389,18 @@ function getResultTracebackDetails () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCredentialDetails () {
|
function getCredentialDetails () {
|
||||||
const credentials = resource.model.get('summary_fields.credentials');
|
let credentials = [];
|
||||||
|
|
||||||
let credentialTags = [];
|
let credentialTags = [];
|
||||||
|
|
||||||
|
if (resource.model.get('type') === 'job') {
|
||||||
|
credentials = resource.model.get('summary_fields.credentials');
|
||||||
|
} else {
|
||||||
|
const credential = resource.model.get('summary_fields.credential');
|
||||||
|
if (credential) {
|
||||||
|
credentials.push(credential);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!credentials || credentials.length < 1) {
|
if (!credentials || credentials.length < 1) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user