diff --git a/src/components/ScenarioTestMenu.jsx b/src/components/ScenarioTestMenu.jsx index e01afb6..c49a92f 100644 --- a/src/components/ScenarioTestMenu.jsx +++ b/src/components/ScenarioTestMenu.jsx @@ -42,6 +42,8 @@ export default function ScenarioTestMenu(props) { // Getting Scenario Test Definition Parameters from the Json const allLoadDesigns = scenarioSpecs.load_design; const allResilienceDesigns = scenarioSpecs.resilience_design; + const allModes = scenarioSpecs.mode; + const allMetrics = scenarioSpecs.metrics; // const metrics = scenarioSpecs.metrics; const settings = scenarioSpecs.settings; @@ -92,49 +94,6 @@ export default function ScenarioTestMenu(props) { } }); - const allModes = [{name: "What if", description: "Check your activity under specific conditions"}, {name: "Monitoring", description: "Monitor your activity in the context of expected behavior"}]; - - const [allMetrics, setAllMetrics] = useState([{ - metric: "maximum_response_time", - description_begin: "What is the maximum time it may take for ", - description_end: null, - insert_to: true, - expected: [ - { - value: 2, - unit: "Seconds" - }, - { - value: 5, - unit: "Seconds" - }, - { - value: 7, - unit: "Seconds" - } - ] - }, - { - metric: "minimum_throughput", - description_begin: "How often do at least ", - description_end: null, - insert_to: false, - expected: [ - { - value: 1000, - unit: "Requests/Day" - }, - { - value: 3000, - unit: "Requests/Day" - }, - { - value: 7000, - unit: "Requests/Day" - } - ] - }]); - const reactFlowInstance = useReactFlow(); const uniqueActivitys = props.edges.filter((obj, index, self) => { diff --git a/src/data/scenariotest-specs.json b/src/data/scenariotest-specs.json index 4b62705..779d58c 100644 --- a/src/data/scenariotest-specs.json +++ b/src/data/scenariotest-specs.json @@ -203,42 +203,56 @@ ] } ], - "metrics": [ + "mode": [ { - "name": "Throughput", - "values": [ - { - "name": "Slow", - "value": 1200 - }, - { - "name": "Normal", - "value": 2400 - }, - { - "name": "Fast", - "value": 3600 - } - ] + "name": "What if", + "description": "Check your activity under specific conditions" }, { - "name": "Response Time", - "values": [ + "name": "Monitoring", + "description": "Monitor your activity in the context of expected behavior" + } + ], + "metrics": [{ + "metric": "maximum_response_time", + "description_begin": "What is the maximum time it may take for ", + "description_end": null, + "insert_to": true, + "expected": [ + { + "value": 2, + "unit": "Seconds" + }, + { + "value": 5, + "unit": "Seconds" + }, + { + "value": 7, + "unit": "Seconds" + } + ] + }, + { + "metric": "minimum_throughput", + "description_begin": "How often do at least ", + "description_end": null, + "insert_to": false, + "expected": [ { - "name": "Slow", - "value": 1200 + "value": 1000, + "unit": "Requests/Day" }, { - "name": "Normal", - "value": 2400 + "value": 3000, + "unit": "Requests/Day" }, { - "name": "Fast", - "value": 3600 + "value": 7000, + "unit": "Requests/Day" } ] - } - ], + }], "settings": { "enviroment": [ "Productive",