diff options
author | brunomilitzer <bruno.militzer@est.tech> | 2022-05-05 14:19:39 +0100 |
---|---|---|
committer | brunomilitzer <bruno.militzer@est.tech> | 2022-05-05 14:19:43 +0100 |
commit | 777d1457e6f24ef187612d0150a5415002550cee (patch) | |
tree | c807c972826576726f0c24a8bdd2850977d3b319 /gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js | |
parent | 2fc78d7979c470c670e4caa154e3ec40fd47c73c (diff) |
Added Edit Button Functionality
Issue-ID: POLICY-4094
Change-Id: I7e83e1c194272f274f351bc1ee34761fcc7353a4
Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
Diffstat (limited to 'gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js')
-rw-r--r-- | gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js b/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js index db71cd9..d120def 100644 --- a/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js +++ b/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js @@ -48,9 +48,7 @@ const AlertStyled = styled(Alert)` const CommissioningModal = (props) => { const [fullToscaTemplate, setFullToscaTemplate] = useState({}); - const [toscaInitialValues, setToscaInitialValues] = useState({}); const [commonProperties, setCommonProperties] = useState({}) - const [toscaJsonSchema, setToscaJsonSchema] = useState({}); const [jsonEditor, setJsonEditor] = useState(null); const [show, setShow] = useState(true); const [alertMessages, setAlertMessages] = useState(); @@ -60,14 +58,13 @@ const CommissioningModal = (props) => { const version = '1.0.0'; useEffect(async () => { - const toscaTemplateResponse = await ACMService.getToscaTemplate(name, version) + const toscaTemplateResponse = await ACMService.getToscaTemplate(name, version, null) .catch(error => error.message); - const toscaCommonProperties = await ACMService.getCommonOrInstanceProperties(name, version, true) + const toscaCommonProperties = await ACMService.getCommonOrInstanceProperties(name, version, null, true) .catch(error => error.message); if (!toscaCommonProperties.ok) { const errorResponse = await toscaCommonProperties.json() - console.log(errorResponse) setCommonProperties(errorResponse) setCommonPropertiesResponseOk(false); } @@ -82,9 +79,7 @@ const CommissioningModal = (props) => { if (toscaTemplateResponse.ok && toscaCommonProperties.ok) { const renderedEditorObjects = CommissioningUtils.renderJsonEditor(toscaTemplateResponse, toscaCommonProperties) setFullToscaTemplate((await renderedEditorObjects).fullTemplate) - setToscaJsonSchema((await renderedEditorObjects).propertySchema) setJsonEditor((await renderedEditorObjects).editorTemp) - setToscaInitialValues((await renderedEditorObjects).toscaInitialValues) } |