mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
add organization to template views in old and new ui
This commit is contained in:
committed by
AlanCoding
parent
7d0b207571
commit
7547793792
@@ -13,6 +13,7 @@ function TemplatesStrings (BaseString) {
|
||||
ADD_DD_JT_LABEL: t.s('Job Template'),
|
||||
ADD_DD_WF_LABEL: t.s('Workflow Template'),
|
||||
OPEN_WORKFLOW_VISUALIZER: t.s('Click here to open the workflow visualizer'),
|
||||
ROW_ITEM_LABEL_ORGANIZATION: t.s('Organization'),
|
||||
ROW_ITEM_LABEL_DESCRIPTION: t.s('Description'),
|
||||
ROW_ITEM_LABEL_ACTIVITY: t.s('Activity'),
|
||||
ROW_ITEM_LABEL_INVENTORY: t.s('Inventory'),
|
||||
|
||||
@@ -91,6 +91,11 @@
|
||||
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_DESCRIPTION') }}"
|
||||
value="{{ template.description | sanitize }}">
|
||||
</at-row-item>
|
||||
<at-row-item
|
||||
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_ORGANIZATION') }}"
|
||||
value="{{ template.summary_fields.organization.name }}"
|
||||
value-link="/#/organizations/{{ template.summary_fields.organization.id }}">
|
||||
</at-row-item>
|
||||
<at-row-item
|
||||
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_INVENTORY') }}"
|
||||
value="{{ template.summary_fields.inventory.name }}"
|
||||
|
||||
@@ -47,6 +47,7 @@ export default ['i18n', 'NotificationsList', 'TemplateList',
|
||||
sourceField: 'name',
|
||||
dataTitle: i18n._('Organization'),
|
||||
required: true,
|
||||
awPopOver: '<p>' + i18n._('When this project is used by a Job Template, Organization cannot be changed.') + '</p>',
|
||||
dataContainer: 'body',
|
||||
dataPlacement: 'right',
|
||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd) || !canEditOrg',
|
||||
|
||||
@@ -168,6 +168,20 @@ function JobTemplateDetail({ i18n, template }) {
|
||||
<Detail label={i18n._(t`Name`)} value={name} dataCy="jt-detail-name" />
|
||||
<Detail label={i18n._(t`Description`)} value={description} />
|
||||
<Detail label={i18n._(t`Job Type`)} value={job_type} />
|
||||
{summary_fields.organization ? (
|
||||
<Detail
|
||||
label={i18n._(t`Organization`)}
|
||||
value={
|
||||
<Link
|
||||
to={`/organizations/${summary_fields.organization.id}/details`}
|
||||
>
|
||||
{summary_fields.organization.name}
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
renderMissingDataDetail(i18n._(t`Project`))
|
||||
)}
|
||||
{summary_fields.inventory ? (
|
||||
<Detail
|
||||
label={i18n._(t`Inventory`)}
|
||||
|
||||
Reference in New Issue
Block a user