From 426fa90230fc6732bd2a74e4c202e697ecd4c11b Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Wed, 8 Sep 2021 12:34:22 +0100 Subject: Make gui-clamp work in Docker image Change package.json to generate URLs relative to current pathname Change REST URLs to use window.location.pathname Remove broken React state variables for window.location.pathname Issue-ID: POLICY-3600 Signed-off-by: danielhanrahan Change-Id: I6951a0a6b3f3bef15d262242df13cc2d20a198c8 --- .../ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js') diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js b/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js index 6ee6a43..380838e 100644 --- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js +++ b/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js @@ -22,14 +22,12 @@ import React, { useState } from "react"; import ControlLoopService from "../../../api/ControlLoopService"; const UploadToscaFile = (props) => { - const [windowLocationPathName, setWindowLocationPathname] = useState(''); const postServiceTemplateHandler = async (event) => { event.preventDefault(); console.log('postServiceTemplateHandler called'); - setWindowLocationPathname(window.location.pathname); - const response = await ControlLoopService.uploadToscaFile(props.toscaObject, windowLocationPathName) + const response = await ControlLoopService.uploadToscaFile(props.toscaObject) .catch(error => error.message); // const responseMessage = await response.text(); -- cgit 1.2.3-korg