CardContent,
Button,
Grid,
- Select
+ Select,
+ CircularProgress
} from '@material-ui/core';
import { ArvadosTheme } from '~/common/custom-theme';
import { UserResource } from "~/models/user";
import { formatDate } from "~/common/formatters";
import { LinkAccountPanelStatus, LinkAccountPanelError } from "~/store/link-account-panel/link-account-panel-reducer";
-type CssRules = 'root';// | 'gridItem' | 'label' | 'title' | 'actions';
+type CssRules = 'root';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
status : LinkAccountPanelStatus;
error: LinkAccountPanelError;
selectedCluster?: string;
+ isProcessing: boolean;
}
export interface LinkAccountPanelRootActionProps {
type LinkAccountPanelRootProps = LinkAccountPanelRootDataProps & LinkAccountPanelRootActionProps & WithStyles<CssRules>;
export const LinkAccountPanelRoot = withStyles(styles) (
- ({classes, targetUser, userToLink, status, error, startLinking, cancelLinking, linkAccount,
+ ({classes, targetUser, userToLink, status, isProcessing, error, startLinking, cancelLinking, linkAccount,
remoteHosts, hasRemoteHosts, selectedCluster, setSelectedCluster, localCluster}: LinkAccountPanelRootProps) => {
return <Card className={classes.root}>
<CardContent>
+ { isProcessing && <Grid container item direction="column" alignContent="center" spacing={24}>
+ <Grid item>
+ Loading user info. Please wait.
+ </Grid>
+ <Grid item style={{ alignSelf: 'center' }}>
+ <CircularProgress/>
+ </Grid>
+ </Grid> }
{ status === LinkAccountPanelStatus.INITIAL && targetUser && <div>
{ isLocalUser(targetUser.uuid, localCluster) ? <Grid container spacing={24}>
<Grid container item direction="column" spacing={24}>
</Grid>
</Grid>
</Grid> }
- </CardContent>
- </Card> ;
+ </CardContent>
+ </Card>;
});
\ No newline at end of file