mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
Fix credential labels in jobs list
This commit is contained in:
@@ -62,6 +62,15 @@ function ListJobsController (
|
|||||||
|
|
||||||
vm.jobTypes = mapChoices(unifiedJob.options('actions.GET.type.choices'));
|
vm.jobTypes = mapChoices(unifiedJob.options('actions.GET.type.choices'));
|
||||||
|
|
||||||
|
vm.buildCredentialTags = (credentials) =>
|
||||||
|
credentials.map(credential => {
|
||||||
|
const icon = `${credential.kind}`;
|
||||||
|
const link = `/#/credentials/${credential.id}`;
|
||||||
|
const value = credential.name;
|
||||||
|
|
||||||
|
return { icon, link, value };
|
||||||
|
});
|
||||||
|
|
||||||
vm.getSref = ({ type, id }) => {
|
vm.getSref = ({ type, id }) => {
|
||||||
let sref;
|
let sref;
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_CREDENTIALS') }}"
|
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_CREDENTIALS') }}"
|
||||||
tag-values="job.summary_fields.credentials"
|
tag-values="job.summary_fields.credentials"
|
||||||
tags-are-creds="true">
|
tags-are-creds="true">
|
||||||
|
<at-toggle-tag ng-init="credTags=vm.buildCredentialTags(job.summary_fields.credentials)" tags="credTags"></at-toggle-tag>
|
||||||
</at-row-item>
|
</at-row-item>
|
||||||
<labels-list class="LabelList" show-delete="false" is-row-item="true" state="job">
|
<labels-list class="LabelList" show-delete="false" is-row-item="true" state="job">
|
||||||
</labels-list>
|
</labels-list>
|
||||||
|
|||||||
Reference in New Issue
Block a user