From efbc1d38602cac310c9c35ea50e49a87eaca607c Mon Sep 17 00:00:00 2001 From: vakarisz Date: Thu, 14 Jul 2022 16:54:43 +0300 Subject: [PATCH] UI: Change PropagationConfig.tsx to use more trivial config schema --- .../PropagationConfig.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/PropagationConfig.tsx b/monkey/monkey_island/cc/ui/src/components/configuration-components/PropagationConfig.tsx index 3d6c2906d..b00e4653d 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/PropagationConfig.tsx +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/PropagationConfig.tsx @@ -46,7 +46,6 @@ export default function PropagationConfig(props) { } const setSection = (sectionKey) => { - console.log('setSection is called with:'+sectionKey); setSelectedSection(sectionKey); } @@ -81,19 +80,10 @@ export default function PropagationConfig(props) { } function getSchemaByKey(schema, key) { - if(key === 'maximum_depth'){ - return schema['properties'][key]; - } - if(key === 'credentials') { - return { properties: CREDENTIALS['properties']}; - } - let definitions = schema['definitions']; - - return {definitions: definitions, properties: schema['properties'][key]['properties']}; + return schema['properties'][key]; } - -function getUiSchemaByKey(uiSchema, key){ +function getUiSchemaByKey(uiSchema, key) { return uiSchema[key]; } @@ -104,5 +94,5 @@ function getNavTitle(schema, key) { if (key === 'credentials') { return 'Credentials'; } - return schema.properties[key].title; + return schema['properties'][key].title; }