[ARVADOS-WORKBENCH2] created: 1.4.1-55-g4f134701
Git user
git at public.curoverse.com
Fri Oct 25 20:41:42 UTC 2019
at 4f1347018edbddff73c8bc1c82f4ff963c11dd1f (commit)
commit 4f1347018edbddff73c8bc1c82f4ff963c11dd1f
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Fri Oct 25 16:41:12 2019 -0400
13936: Embed InactivePageHTML on inactive panel
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/src/common/config.ts b/src/common/config.ts
index 1f668292..8f182324 100644
--- a/src/common/config.ts
+++ b/src/common/config.ts
@@ -45,6 +45,7 @@ export interface ClusterConfigJSON {
VocabularyURL: string;
FileViewersConfigURL: string;
WelcomePageHTML: string;
+ InactivePageHTML: string;
};
}
@@ -143,6 +144,7 @@ export const mockClusterConfigJSON = (config: Partial<ClusterConfigJSON>): Clust
VocabularyURL: "",
FileViewersConfigURL: "",
WelcomePageHTML: "",
+ InactivePageHTML: "",
},
...config
});
diff --git a/src/views/inactive-panel/inactive-panel.tsx b/src/views/inactive-panel/inactive-panel.tsx
index 8d53a21e..91b4a51d 100644
--- a/src/views/inactive-panel/inactive-panel.tsx
+++ b/src/views/inactive-panel/inactive-panel.tsx
@@ -9,7 +9,7 @@ import { Grid, Typography, Button } from '@material-ui/core';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
import { ArvadosTheme } from '~/common/custom-theme';
import { navigateToLinkAccount } from '~/store/navigation/navigation-action';
-
+import { RootState } from '~/store/store';
type CssRules = 'root' | 'ontop' | 'title';
@@ -47,31 +47,32 @@ const mapDispatchToProps = (dispatch: Dispatch): InactivePanelActionProps => ({
}
});
-type InactivePanelProps = WithStyles<CssRules> & InactivePanelActionProps;
+export interface InactivePanelStateProps {
+ inactivePageText: string;
+}
+
+type InactivePanelProps = WithStyles<CssRules> & InactivePanelActionProps & InactivePanelStateProps;
-export const InactivePanel = connect(null, mapDispatchToProps)(withStyles(styles)((({ classes, startLinking }: InactivePanelProps) =>
- <Grid container justify="center" alignItems="center" direction="column" spacing={24}
- className={classes.root}
- style={{ marginTop: 56, height: "100%" }}>
- <Grid item>
- <Typography variant='h6' align="center" className={classes.title}>
- Hi! You're logged in, but...
- </Typography>
- </Grid>
- <Grid item>
- <Typography align="center">
- Your account is inactive. An administrator must activate your account before you can get any further.
- </Typography>
- </Grid>
- <Grid item>
- <Typography align="center">
- If you would like to use this login to access another account click "Link Account".
- </Typography>
- </Grid>
- <Grid item>
- <Button className={classes.ontop} color="primary" variant="contained" onClick={() => startLinking()}>
- Link Account
- </Button>
- </Grid>
- </Grid >
- )));
+export const InactivePanel = connect((state: RootState) => ({
+ inactivePageText: state.config.clusterConfig.Workbench.InactivePageHTML
+}), mapDispatchToProps)(withStyles(styles)((({ classes, startLinking, inactivePageText }: InactivePanelProps) =>
+ <Grid container justify="center" alignItems="center" direction="column" spacing={24}
+ className={classes.root}
+ style={{ marginTop: 56, height: "100%" }}>
+ <Grid item>
+ <Typography>
+ <div dangerouslySetInnerHTML={{ __html: inactivePageText }} style={{ margin: "1em" }} />
+ </Typography>
+ </Grid>
+ <Grid item>
+ <Typography align="center">
+ If you would like to use this login to access another account click "Link Account".
+ </Typography>
+ </Grid>
+ <Grid item>
+ <Button className={classes.ontop} color="primary" variant="contained" onClick={() => startLinking()}>
+ Link Account
+ </Button>
+ </Grid>
+ </Grid >
+)));
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list