UI: Change PropagationConfig.tsx to use more trivial config schema
This commit is contained in:
parent
a721508be2
commit
efbc1d3860
|
@ -46,7 +46,6 @@ export default function PropagationConfig(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const setSection = (sectionKey) => {
|
const setSection = (sectionKey) => {
|
||||||
console.log('setSection is called with:'+sectionKey);
|
|
||||||
setSelectedSection(sectionKey);
|
setSelectedSection(sectionKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,19 +80,10 @@ export default function PropagationConfig(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSchemaByKey(schema, key) {
|
function getSchemaByKey(schema, key) {
|
||||||
if(key === 'maximum_depth'){
|
|
||||||
return schema['properties'][key];
|
return schema['properties'][key];
|
||||||
}
|
|
||||||
if(key === 'credentials') {
|
|
||||||
return { properties: CREDENTIALS['properties']};
|
|
||||||
}
|
|
||||||
let definitions = schema['definitions'];
|
|
||||||
|
|
||||||
return {definitions: definitions, properties: schema['properties'][key]['properties']};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getUiSchemaByKey(uiSchema, key) {
|
||||||
function getUiSchemaByKey(uiSchema, key){
|
|
||||||
return uiSchema[key];
|
return uiSchema[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,5 +94,5 @@ function getNavTitle(schema, key) {
|
||||||
if (key === 'credentials') {
|
if (key === 'credentials') {
|
||||||
return 'Credentials';
|
return 'Credentials';
|
||||||
}
|
}
|
||||||
return schema.properties[key].title;
|
return schema['properties'][key].title;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue