import { TextField } from "~/components/text-field/text-field";
import { addSession } from "~/store/auth/auth-action-session";
import { SITE_MANAGER_REMOTE_HOST_VALIDATION } from "~/validators/validators";
+import { Config } from '~/common/config';
+import { ResourceCluster } from '~/views-components/data-explorer/renderers';
type CssRules = 'root' | 'link' | 'buttonContainer' | 'table' | 'tableRow' |
'remoteSiteInfo' | 'buttonAdd' | 'buttonLoggedIn' | 'buttonLoggedOut' |
export interface SiteManagerPanelRootDataProps {
sessions: Session[];
+ remoteHostsConfig: { [key: string]: Config };
}
type SiteManagerPanelRootProps = SiteManagerPanelRootDataProps & SiteManagerPanelRootActionProps & WithStyles<CssRules> & InjectedFormProps;
}
}),
withStyles(styles))
- (({ classes, sessions, handleSubmit, toggleSession }: SiteManagerPanelRootProps) =>
+ (({ classes, sessions, handleSubmit, toggleSession, remoteHostsConfig }: SiteManagerPanelRootProps) =>
<Card className={classes.root}>
<CardContent>
<Grid container direction="row">
<Grid item xs={12}>
<Typography paragraph={true} >
You can log in to multiple Arvados sites here, then use the multi-site search page to search collections and projects on all sites at once.
- </Typography>
+ </Typography>
</Grid>
</Grid>
<Grid item xs={12}>
<TableRow className={classes.tableRow}>
<TableCell>Cluster ID</TableCell>
<TableCell>Host</TableCell>
- <TableCell>Username</TableCell>
<TableCell>Email</TableCell>
+ <TableCell>UUID</TableCell>
<TableCell>Status</TableCell>
</TableRow>
</TableHead>
{sessions.map((session, index) => {
const validating = session.status === SessionStatus.BEING_VALIDATED;
return <TableRow key={index} className={classes.tableRow}>
- <TableCell>{session.clusterId}</TableCell>
+ <TableCell>{remoteHostsConfig[session.clusterId] ?
+ <a href={remoteHostsConfig[session.clusterId].workbench2Url} style={{ textDecoration: 'none' }}> <ResourceCluster uuid={session.clusterId} /></a>
+ : session.clusterId}</TableCell>
<TableCell>{session.remoteHost}</TableCell>
- <TableCell>{validating ? <CircularProgress size={20} /> : session.username}</TableCell>
<TableCell>{validating ? <CircularProgress size={20} /> : session.email}</TableCell>
+ <TableCell>{validating ? <CircularProgress size={20} /> : session.uuid}</TableCell>
<TableCell className={classes.statusCell}>
<Button fullWidth
disabled={validating || session.status === SessionStatus.INVALIDATED || session.active}
<Grid item xs={12}>
<Typography paragraph={true} className={classes.remoteSiteInfo}>
To add a remote Arvados site, paste the remote site's host here (see "ARVADOS_API_HOST" on the "current token" page).
- </Typography>
+ </Typography>
</Grid>
<Grid item xs={8}>
<Field