1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Allow enable/disable of hosts in dynamic inventory from the UI.

The API lets you do it, so we shouldn't block it from the UI.
This commit is contained in:
Bill Nottingham 2019-08-05 11:18:56 -04:00
parent 50c0867156
commit 8e1e33735a
6 changed files with 15 additions and 18 deletions

View File

@ -34,11 +34,10 @@ function(i18n) {
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
" inventory, this may be" +
" reset by the inventory sync process.") +
"</p>",
dataTitle: i18n._('Host Enabled'),
ngDisabled: 'host.has_inventory_sources'
}
},
fields: {

View File

@ -27,7 +27,6 @@ export default ['i18n', function(i18n) {
{
field: 'toggleHost',
content: {
ngDisabled: 'host.has_inventory_sources',
label: '',
columnClass: 'List-staticColumn--toggle',
type: "toggle",
@ -36,8 +35,8 @@ export default ['i18n', function(i18n) {
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
" inventory, this flag may be" +
" reset by the inventory sync process.") +
"</p>",
dataPlacement: "right",
nosort: true,

View File

@ -33,11 +33,10 @@ function(i18n) {
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
" inventory, this may be" +
" reset by the inventory sync process.") +
"</p>",
dataTitle: i18n._('Host Enabled'),
ngDisabled: 'host.has_inventory_sources'
}
},
fields: {

View File

@ -23,7 +23,7 @@ export default ['i18n', function(i18n) {
{
field: 'toggleHost',
content: {
ngDisabled: '!nested_host.summary_fields.user_capabilities.edit || nested_host.has_inventory_sources',
ngDisabled: '!nested_host.summary_fields.user_capabilities.edit',
label: '',
columnClass: 'List-staticColumn--toggle',
type: "toggle",
@ -32,8 +32,8 @@ export default ['i18n', function(i18n) {
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
" inventory, this flag may be" +
" reset by the inventory sync process.") +
"</p>",
dataPlacement: "right",
nosort: true,

View File

@ -33,12 +33,12 @@ function(i18n) {
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
" inventory, this may be" +
" reset by the inventory sync process.") +
"</p>",
dataTitle: i18n._('Host Enabled'),
dataPlacement: "right",
ngDisabled: '!host.summary_fields.user_capabilities.edit || host.has_inventory_sources || isSmartInvHost'
ngDisabled: '!host.summary_fields.user_capabilities.edit || isSmartInvHost'
}
},
fields: {

View File

@ -22,7 +22,7 @@ export default ['i18n', function(i18n) {
{
field: 'toggleHost',
content: {
ngDisabled: '!host.summary_fields.user_capabilities.edit || host.has_inventory_sources',
ngDisabled: '!host.summary_fields.user_capabilities.edit',
label: '',
type: "toggle",
ngClick: "toggleHost($event, host)",
@ -30,8 +30,8 @@ export default ['i18n', function(i18n) {
i18n._("Indicates if a host is available and should be included in running jobs.") +
"</p><p>" +
i18n._("For hosts that are part of an external" +
" inventory, this flag cannot be changed. It will be" +
" set by the inventory sync process.") +
" inventory, this may be" +
" reset by the inventory sync process.") +
"</p>",
dataPlacement: "right",
nosort: true,