mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 12:25:01 -02:30
Merge pull request #252 from gconsidine/ui/fix/credential-with-empty-type
Fix credential create/edit using type with no fields
This commit is contained in:
@@ -54,16 +54,18 @@ function AtInputGroupController ($scope, $compile) {
|
|||||||
vm.createComponentConfigs = inputs => {
|
vm.createComponentConfigs = inputs => {
|
||||||
let group = [];
|
let group = [];
|
||||||
|
|
||||||
inputs.forEach((input, i) => {
|
if (inputs) {
|
||||||
input = Object.assign(input, vm.getComponentType(input));
|
inputs.forEach((input, i) => {
|
||||||
|
input = Object.assign(input, vm.getComponentType(input));
|
||||||
|
|
||||||
group.push(Object.assign({
|
group.push(Object.assign({
|
||||||
_element: vm.createComponent(input, i),
|
_element: vm.createComponent(input, i),
|
||||||
_key: 'inputs',
|
_key: 'inputs',
|
||||||
_group: true,
|
_group: true,
|
||||||
_groupIndex: i
|
_groupIndex: i
|
||||||
}, input));
|
}, input));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ function createFormSchema (method, config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function assignInputGroupValues (inputs) {
|
function assignInputGroupValues (inputs) {
|
||||||
|
if (!inputs) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
return inputs.map(input => {
|
return inputs.map(input => {
|
||||||
let value = this.get(`inputs.${input.id}`);
|
let value = this.get(`inputs.${input.id}`);
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ function categorizeByKind () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mergeInputProperties () {
|
function mergeInputProperties () {
|
||||||
|
if (!this.has('inputs.fields')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let required = this.get('inputs.required');
|
let required = this.get('inputs.required');
|
||||||
|
|
||||||
return this.get('inputs.fields').map((field, i) => {
|
return this.get('inputs.fields').map((field, i) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user