added error user feedback to grouptree, removed console logs

This commit is contained in:
Sina Blattmann 2023-07-20 17:37:14 +02:00
parent 1cb78f7a05
commit ac8a2e6489
7 changed files with 3 additions and 10 deletions

View File

@ -42,7 +42,6 @@ const App = () => {
if (token && getCurrentUser()?.mustResetPassword) { if (token && getCurrentUser()?.mustResetPassword) {
return <ResetPassword />; return <ResetPassword />;
} }
console.log("lang", language);
return ( return (
<BrowserRouter> <BrowserRouter>
<IntlProvider <IntlProvider

View File

@ -55,7 +55,6 @@ const S3CredentialsContextProvider = ({
} }
}) })
.catch((e) => { .catch((e) => {
console.log("catch", e);
return Promise.resolve(FetchResult.tryLater); return Promise.resolve(FetchResult.tryLater);
}); });
} }

View File

@ -22,8 +22,6 @@ const GroupTabs = () => {
const id = routeMatch?.params?.id; const id = routeMatch?.params?.id;
console.log("fuck", routeMatch?.pattern?.path, currentType);
if (id) { if (id) {
return ( return (
<Box sx={{ width: "100%" }}> <Box sx={{ width: "100%" }}>

View File

@ -58,7 +58,6 @@ const GroupTree = () => {
</> </>
} }
onClick={() => { onClick={() => {
console.log("fuck", element.type);
setCurrentType(element.type); setCurrentType(element.type);
}} }}
sx={{ ".MuiTreeItem-label": { display: "flex" } }} sx={{ ".MuiTreeItem-label": { display: "flex" } }}
@ -77,6 +76,9 @@ const GroupTree = () => {
</Grid> </Grid>
); );
} }
if (getError) {
return <Alert severity="error">{getError.message} </Alert>;
}
if (data) { if (data) {
return ( return (
<TreeView <TreeView
@ -105,8 +107,6 @@ const GroupTree = () => {
{renderTree(data)} {renderTree(data)}
</TreeView> </TreeView>
); );
} else if (getError) {
return <Alert severity="error">{getError.message} </Alert>;
} }
return null; return null;
}; };

View File

@ -67,7 +67,6 @@ const InstallationForm = (props: I_InstallationFormProps) => {
handleSubmit(values, formikValues) handleSubmit(values, formikValues)
.then(() => { .then(() => {
setOpen(true); setOpen(true);
console.log(additionalButtons, "addbuttons");
additionalButtons && additionalButtons.length > 0 additionalButtons && additionalButtons.length > 0
? fetchGroups() ? fetchGroups()
: fetchInstallations(); : fetchInstallations();

View File

@ -152,7 +152,6 @@ const ScalarGraph = () => {
</LocalizationProvider> </LocalizationProvider>
{visibleGraphs.map((path) => { {visibleGraphs.map((path) => {
const isScalar = isNumeric(coordinateTimeSeries[path].y[0]); const isScalar = isNumeric(coordinateTimeSeries[path].y[0]);
console.log("graphdata", timeSeries, coordinateTimeSeries);
const data = isScalar const data = isScalar
? [ ? [

View File

@ -207,7 +207,6 @@ export interface I_CsvEntry {
} }
export const parseCsv = (text: string): DataRecord => { export const parseCsv = (text: string): DataRecord => {
console.log("parseText", text);
const y = text const y = text
.split(/\r?\n/) .split(/\r?\n/)
.filter((split) => split.length > 0) .filter((split) => split.length > 0)