mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Fix credential create/edit using type with no fields
This commit is contained in:
parent
9b27bc193f
commit
4a37f049b0
@ -54,16 +54,18 @@ function AtInputGroupController ($scope, $compile) {
|
||||
vm.createComponentConfigs = inputs => {
|
||||
let group = [];
|
||||
|
||||
inputs.forEach((input, i) => {
|
||||
input = Object.assign(input, vm.getComponentType(input));
|
||||
if (inputs) {
|
||||
inputs.forEach((input, i) => {
|
||||
input = Object.assign(input, vm.getComponentType(input));
|
||||
|
||||
group.push(Object.assign({
|
||||
_element: vm.createComponent(input, i),
|
||||
_key: 'inputs',
|
||||
_group: true,
|
||||
_groupIndex: i
|
||||
}, input));
|
||||
});
|
||||
group.push(Object.assign({
|
||||
_element: vm.createComponent(input, i),
|
||||
_key: 'inputs',
|
||||
_group: true,
|
||||
_groupIndex: i
|
||||
}, input));
|
||||
});
|
||||
}
|
||||
|
||||
return group;
|
||||
};
|
||||
|
@ -26,6 +26,10 @@ function createFormSchema (method, config) {
|
||||
}
|
||||
|
||||
function assignInputGroupValues (inputs) {
|
||||
if (!inputs) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return inputs.map(input => {
|
||||
let value = this.get(`inputs.${input.id}`);
|
||||
|
||||
|
@ -15,6 +15,10 @@ function categorizeByKind () {
|
||||
}
|
||||
|
||||
function mergeInputProperties () {
|
||||
if (!this.has('inputs.fields')) {
|
||||
return;
|
||||
}
|
||||
|
||||
let required = this.get('inputs.required');
|
||||
|
||||
return this.get('inputs.fields').map((field, i) => {
|
||||
|
Loading…
Reference in New Issue
Block a user