From b7e6435cedbfcc464373d396098c88575d88bec3 Mon Sep 17 00:00:00 2001 From: vakaris_zilius Date: Wed, 7 Sep 2022 09:10:44 +0000 Subject: [PATCH] UI: Delete InternalConfig.js This is no longer used, advanced tab only contains a couple of fields now --- .../InternalConfig.js | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js b/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js deleted file mode 100644 index c14b777f1..000000000 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js +++ /dev/null @@ -1,73 +0,0 @@ -import Form from 'react-jsonschema-form-bs4'; -import React, {useState} from 'react'; -import {Nav} from 'react-bootstrap'; - -const sectionOrder = [ - 'network', - 'exploits', - 'classes', - 'general' -]; -const initialSection = sectionOrder[0]; - -export default function InternalConfig(props) { - const { - schema, - uiSchema, - onChange, - customFormats, - className, - formData - } = props; - const [selectedSection, setSelectedSection] = useState(initialSection); - const [displayedSchema, setDisplayedSchema] = useState(getSchemaByKey(schema, initialSection)); - const [displayedSchemaUi, setDisplayedSchemaUi] = useState(uiSchema[initialSection]); - - const onInnerDataChange = (innerData) => { - formData[selectedSection] = innerData.formData; - onChange({formData: formData}); - } - - const setSection = (sectionKey) => { - setSelectedSection(sectionKey); - setDisplayedSchema(getSchemaByKey(schema, sectionKey)); - setDisplayedSchemaUi(uiSchema[sectionKey]); - } - - const renderNav = () => { - return () - } - - return (
- {renderNav()} -
- -
-
) -} - -function getSchemaByKey(schema, key) { - let definitions = schema['definitions']; - return {definitions: definitions, properties: schema['properties'][key]['properties']}; -} - -function getNavTitle(schema, key) { - return schema.properties[key].title; -}