15255: Don't render fedtoken iframe if workbench2 config is missing.
[arvados-workbench2.git] / src / views / login-panel / login-panel.tsx
index 12c7d6c79de9ccdc0ccad399250ce6c752ed4e59..41a17bf9682c1b7fb86d5436097ac24673b19693 100644 (file)
@@ -61,7 +61,9 @@ export const LoginPanel = withStyles(styles)(
         homeCluster: state.auth.homeCluster,
         uuidPrefix: state.auth.localCluster
     }))(({ classes, dispatch, remoteHosts, homeCluster, uuidPrefix }: LoginPanelProps) =>
-        <Grid container direction="column" item xs alignItems="center" justify="center" className={classes.root}>
+        <Grid container justify="center" alignItems="center"
+            className={classes.root}
+            style={{ marginTop: 56, overflowY: "auto", height: "100%" }}>
             <Grid item className={classes.container}>
                 <Typography variant='h6' align="center" className={classes.title}>
                     Welcome to the Arvados Workbench
@@ -91,12 +93,12 @@ export const LoginPanel = withStyles(styles)(
 
                 <Typography component="div" align="right">
                     <Button variant="contained" color="primary" style={{ margin: "1em" }} className={classes.button}
-                        onClick={() => dispatch(login(uuidPrefix, remoteHosts[homeCluster]))}>
+                        onClick={() => dispatch(login(uuidPrefix, homeCluster, remoteHosts))}>
                         Log in to {uuidPrefix}
                         {uuidPrefix !== homeCluster &&
                             <span>&nbsp;with user from {homeCluster}</span>}
                     </Button>
                 </Typography>
             </Grid>
-        </Grid>
+        </Grid >
     ));