mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Hide Ansible Environment form fields when there are no custom venvs
This commit is contained in:
@@ -52,7 +52,8 @@ export default ['NotificationsList', 'i18n',
|
|||||||
dataTitle: i18n._('Ansible Environment'),
|
dataTitle: i18n._('Ansible Environment'),
|
||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || canAdd)'
|
ngDisabled: '!(organization_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
|
ngShow: 'custom_virtualenvs_options.length > 0'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -52,17 +52,6 @@ export default ['i18n', 'NotificationsList', 'TemplateList',
|
|||||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd) || !canEditOrg',
|
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd) || !canEditOrg',
|
||||||
awLookupWhen: '(project_obj.summary_fields.user_capabilities.edit || canAdd) && canEditOrg'
|
awLookupWhen: '(project_obj.summary_fields.user_capabilities.edit || canAdd) && canEditOrg'
|
||||||
},
|
},
|
||||||
custom_virtualenv: {
|
|
||||||
label: i18n._('Ansible Environment'),
|
|
||||||
type: 'select',
|
|
||||||
defaultText: i18n._('Select Ansible Environment'),
|
|
||||||
ngOptions: 'venv for venv in custom_virtualenvs_options track by venv',
|
|
||||||
awPopOver: "<p>" + i18n._("Select the custom Python virtual environment for this project to run on.") + "</p>",
|
|
||||||
dataTitle: i18n._('Ansible Environment'),
|
|
||||||
dataContainer: 'body',
|
|
||||||
dataPlacement: 'right',
|
|
||||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
|
||||||
},
|
|
||||||
scm_type: {
|
scm_type: {
|
||||||
label: i18n._('SCM Type'),
|
label: i18n._('SCM Type'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -211,8 +200,21 @@ export default ['i18n', 'NotificationsList', 'TemplateList',
|
|||||||
dataTitle: i18n._('Cache Timeout'),
|
dataTitle: i18n._('Cache Timeout'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: "body",
|
dataContainer: "body",
|
||||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)'
|
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
}
|
subForm: 'sourceSubForm'
|
||||||
|
},
|
||||||
|
custom_virtualenv: {
|
||||||
|
label: i18n._('Ansible Environment'),
|
||||||
|
type: 'select',
|
||||||
|
defaultText: i18n._('Select Ansible Environment'),
|
||||||
|
ngOptions: 'venv for venv in custom_virtualenvs_options track by venv',
|
||||||
|
awPopOver: "<p>" + i18n._("Select the custom Python virtual environment for this project to run on.") + "</p>",
|
||||||
|
dataTitle: i18n._('Ansible Environment'),
|
||||||
|
dataContainer: 'body',
|
||||||
|
dataPlacement: 'right',
|
||||||
|
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
|
ngShow: 'custom_virtualenvs_options.length > 0'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
buttons: {
|
buttons: {
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
.at-Upgrade--panel {
|
.at-Upgrade--panel {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: @at-color-body-background-light;
|
background-color: @at-color-body-background-light;
|
||||||
|
border-radius: 10px;
|
||||||
color: @at-color-body-text;
|
color: @at-color-body-text;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
font-size: @at-font-size-jumbotron-text;
|
font-size: @at-font-size-jumbotron-text;
|
||||||
|
height: ~"calc(100vh - 40px)";
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: @at-space-10x;
|
margin: @at-space-4x;
|
||||||
padding: @at-space-10x;
|
padding: @at-space-10x;
|
||||||
}
|
}
|
||||||
|
|
||||||
.at-Upgrade--header {
|
.at-Upgrade--header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -240,7 +240,8 @@ function(NotificationsList, i18n) {
|
|||||||
dataTitle: i18n._('Ansible Environment'),
|
dataTitle: i18n._('Ansible Environment'),
|
||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)'
|
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
|
ngShow: 'custom_virtualenvs_options.length > 0'
|
||||||
},
|
},
|
||||||
instance_groups: {
|
instance_groups: {
|
||||||
label: i18n._('Instance Groups'),
|
label: i18n._('Instance Groups'),
|
||||||
|
|||||||
Reference in New Issue
Block a user