diff --git a/src/frontend/package.json b/src/frontend/package.json index 494db2ed3..2a27406b4 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -53,5 +53,6 @@ "last 1 firefox version", "last 1 safari version" ] - } + }, + "proxy":"http://localhost:7860" } \ No newline at end of file diff --git a/src/frontend/src/controllers/NodesServices/index.ts b/src/frontend/src/controllers/NodesServices/index.ts index 3478d9d48..7a1fdb348 100644 --- a/src/frontend/src/controllers/NodesServices/index.ts +++ b/src/frontend/src/controllers/NodesServices/index.ts @@ -4,10 +4,10 @@ import axios, { AxiosResponse } from "axios"; const backendUrl = process.env.BACKEND || "http://localhost:5003"; export async function getAll():Promise> { - return await axios.get(`${backendUrl}/all`); + return await axios.get(`/all`); } export async function sendAll(data:sendAllProps) { console.log(data); - return await axios.post(`${backendUrl}/predict`, data); + return await axios.post(`/predict`, data); } \ No newline at end of file diff --git a/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx index 6b2e05b08..6396b753f 100644 --- a/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx @@ -4,17 +4,24 @@ import TabComponent from "../tabComponent"; import { TabsContext } from "../../../../contexts/tabsContext"; import FlowPage from "../.."; import { darkContext } from "../../../../contexts/darkContext"; -import { BellIcon, MoonIcon, SunIcon } from "@heroicons/react/24/outline"; +import { + ArrowDownTrayIcon, + ArrowUpTrayIcon, + BellIcon, + MoonIcon, + SunIcon, +} from "@heroicons/react/24/outline"; import { PopUpContext } from "../../../../contexts/popUpContext"; import AlertDropdown from "../../../../alerts/alertDropDown"; import { alertContext } from "../../../../contexts/alertContext"; export default function TabsManagerComponent() { - const { flows, addFlow, tabIndex, setTabIndex } = useContext(TabsContext); + const { flows, addFlow, tabIndex, setTabIndex, uploadFlow, downloadFlow } = useContext(TabsContext); const { openPopUp } = useContext(PopUpContext); - const AlertWidth = 256 + const AlertWidth = 256; const { dark, setDark } = useContext(darkContext); - const {notificationCenter, setNotificationCenter} = useContext(alertContext) + const { notificationCenter, setNotificationCenter } = + useContext(alertContext); useEffect(() => { //create the first flow if (flows.length === 0) { @@ -43,6 +50,12 @@ export default function TabsManagerComponent() { flow={null} />
+ +
diff --git a/src/frontend/src/pages/FlowPage/index.tsx b/src/frontend/src/pages/FlowPage/index.tsx index 2cf11574f..6471621af 100644 --- a/src/frontend/src/pages/FlowPage/index.tsx +++ b/src/frontend/src/pages/FlowPage/index.tsx @@ -182,17 +182,6 @@ export default function FlowPage({ flow }:{flow:FlowType}) { > - uploadFlow()} - > - - - - downloadFlow()} - > - -