mirror of
https://github.com/ansible/awx.git
synced 2026-07-09 15:28:05 -02:30
Merge pull request #1131 from marshmalien/fix/small_ui_improvements
UI Fix inventory list action buttons, upgrade screen, custom venv fields
This commit is contained in:
@@ -113,7 +113,7 @@ export default ['i18n', function(i18n) {
|
|||||||
"class": 'btn-danger btn-xs',
|
"class": 'btn-danger btn-xs',
|
||||||
awToolTip: i18n._('Copy inventory'),
|
awToolTip: i18n._('Copy inventory'),
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
ngShow: 'inventory.summary_fields.user_capabilities.edit'
|
ngShow: '!inventory.pending_deletion && inventory.summary_fields.user_capabilities.edit'
|
||||||
},
|
},
|
||||||
view: {
|
view: {
|
||||||
label: i18n._('View'),
|
label: i18n._('View'),
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ export default ['$compile', 'Attr', 'Icon',
|
|||||||
}
|
}
|
||||||
if (field_action === 'pending_deletion') {
|
if (field_action === 'pending_deletion') {
|
||||||
innerTable += `<a ng-if='${list.iterator}.pending_deletion'>Pending Delete</a>`;
|
innerTable += `<a ng-if='${list.iterator}.pending_deletion'>Pending Delete</a>`;
|
||||||
}
|
} else {
|
||||||
// Plug in Dropdown Component
|
// Plug in Dropdown Component
|
||||||
if (field_action === 'submit' && list.fieldActions[field_action].relaunch === true) {
|
if (field_action === 'submit' && list.fieldActions[field_action].relaunch === true) {
|
||||||
innerTable += `<at-relaunch job="${list.iterator}"></at-relaunch>`;
|
innerTable += `<at-relaunch job="${list.iterator}"></at-relaunch>`;
|
||||||
@@ -455,6 +455,7 @@ export default ['$compile', 'Attr', 'Icon',
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
innerTable += "</div></td>\n";
|
innerTable += "</div></td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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