mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
don't ignore choices param in input config
We always want to use choices if they're available in the input config from the api. An input can sometimes have no type. Usually we'd throw an error but we can still load a component if it defines a set of choices to use instead of a type.
This commit is contained in:
parent
956f588fd8
commit
da9abc087e
@ -114,12 +114,16 @@ function AtInputGroupController ($scope, $compile) {
|
||||
config._component = 'at-input-checkbox';
|
||||
} else if (input.type === 'file') {
|
||||
config._component = 'at-input-file';
|
||||
} else if (input.choices) {
|
||||
}
|
||||
|
||||
if (input.choices) {
|
||||
config._component = 'at-input-select';
|
||||
config._format = 'array';
|
||||
config._data = input.choices;
|
||||
config._exp = 'choice for (index, choice) in state._data';
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!config._component) {
|
||||
const preface = vm.strings.get('group.UNSUPPORTED_ERROR_PREFACE');
|
||||
throw new Error(`${preface}: ${input.type}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user