From ac8a2e6489117d21daca68edbe5e0265b648e662 Mon Sep 17 00:00:00 2001 From: Sina Blattmann Date: Thu, 20 Jul 2023 17:37:14 +0200 Subject: [PATCH] added error user feedback to grouptree, removed console logs --- typescript/Frontend/src/App.tsx | 1 - .../src/components/Context/S3CredentialsContextProvider.tsx | 1 - typescript/Frontend/src/components/Groups/GroupTabs.tsx | 2 -- typescript/Frontend/src/components/Groups/GroupTree.tsx | 6 +++--- .../components/Installations/Detail/InstallationForm.tsx | 1 - .../src/components/Installations/Log/ScalarGraph.tsx | 1 - typescript/Frontend/src/util/graph.util.tsx | 1 - 7 files changed, 3 insertions(+), 10 deletions(-) diff --git a/typescript/Frontend/src/App.tsx b/typescript/Frontend/src/App.tsx index e979dfa0c..ea3ca8592 100644 --- a/typescript/Frontend/src/App.tsx +++ b/typescript/Frontend/src/App.tsx @@ -42,7 +42,6 @@ const App = () => { if (token && getCurrentUser()?.mustResetPassword) { return ; } - console.log("lang", language); return ( { - console.log("catch", e); return Promise.resolve(FetchResult.tryLater); }); } diff --git a/typescript/Frontend/src/components/Groups/GroupTabs.tsx b/typescript/Frontend/src/components/Groups/GroupTabs.tsx index f17eb01bb..9e1ec6d73 100644 --- a/typescript/Frontend/src/components/Groups/GroupTabs.tsx +++ b/typescript/Frontend/src/components/Groups/GroupTabs.tsx @@ -22,8 +22,6 @@ const GroupTabs = () => { const id = routeMatch?.params?.id; - console.log("fuck", routeMatch?.pattern?.path, currentType); - if (id) { return ( diff --git a/typescript/Frontend/src/components/Groups/GroupTree.tsx b/typescript/Frontend/src/components/Groups/GroupTree.tsx index e60a86f4b..c9af1c0fd 100644 --- a/typescript/Frontend/src/components/Groups/GroupTree.tsx +++ b/typescript/Frontend/src/components/Groups/GroupTree.tsx @@ -58,7 +58,6 @@ const GroupTree = () => { } onClick={() => { - console.log("fuck", element.type); setCurrentType(element.type); }} sx={{ ".MuiTreeItem-label": { display: "flex" } }} @@ -77,6 +76,9 @@ const GroupTree = () => { ); } + if (getError) { + return {getError.message} ; + } if (data) { return ( { {renderTree(data)} ); - } else if (getError) { - return {getError.message} ; } return null; }; diff --git a/typescript/Frontend/src/components/Installations/Detail/InstallationForm.tsx b/typescript/Frontend/src/components/Installations/Detail/InstallationForm.tsx index afe2dcde6..e780ab854 100644 --- a/typescript/Frontend/src/components/Installations/Detail/InstallationForm.tsx +++ b/typescript/Frontend/src/components/Installations/Detail/InstallationForm.tsx @@ -67,7 +67,6 @@ const InstallationForm = (props: I_InstallationFormProps) => { handleSubmit(values, formikValues) .then(() => { setOpen(true); - console.log(additionalButtons, "addbuttons"); additionalButtons && additionalButtons.length > 0 ? fetchGroups() : fetchInstallations(); diff --git a/typescript/Frontend/src/components/Installations/Log/ScalarGraph.tsx b/typescript/Frontend/src/components/Installations/Log/ScalarGraph.tsx index c266e4c9c..844dc4793 100644 --- a/typescript/Frontend/src/components/Installations/Log/ScalarGraph.tsx +++ b/typescript/Frontend/src/components/Installations/Log/ScalarGraph.tsx @@ -152,7 +152,6 @@ const ScalarGraph = () => { {visibleGraphs.map((path) => { const isScalar = isNumeric(coordinateTimeSeries[path].y[0]); - console.log("graphdata", timeSeries, coordinateTimeSeries); const data = isScalar ? [ diff --git a/typescript/Frontend/src/util/graph.util.tsx b/typescript/Frontend/src/util/graph.util.tsx index 1d140045c..4b8df29e8 100644 --- a/typescript/Frontend/src/util/graph.util.tsx +++ b/typescript/Frontend/src/util/graph.util.tsx @@ -207,7 +207,6 @@ export interface I_CsvEntry { } export const parseCsv = (text: string): DataRecord => { - console.log("parseText", text); const y = text .split(/\r?\n/) .filter((split) => split.length > 0)