export const CodeSnippet = withStyles(styles)(connect(mapStateToProps)(
({ classes, lines, linked, className, apiResponse, dispatch, auth, children, inline }: CodeSnippetProps & CodeSnippetAuthProps & DispatchProp) =>
<Typography
- component="div"
- className={classNames([classes.root, className, inline ? classes.inlineRoot: undefined])}>
+ component="div"
+ className={classNames([classes.root, className, inline ? classes.inlineRoot : undefined])}>
<Typography className={apiResponse ? classes.space : classNames([className, inline ? classes.inline : undefined])} component="pre">
{children}
{linked ?
}
</Typography>
</Typography>
- ));
+));
const renderLinks = (auth: FederationConfig, dispatch: Dispatch) => (text: string): JSX.Element => {
// Matches UUIDs & PDHs
<React.Fragment key={index}>
{part}
{links[index] &&
- <Link onClick={() => {
- const url = getNavUrl(links[index], auth)
- if (url) {
- window.open(`${window.location.origin}${url}`, '_blank');
- } else {
- dispatch(navigationNotAvailable(links[index]));
- }
- }}
- style={ {cursor: 'pointer'} }>
- {links[index]}
- </Link>}
+ <Link onClick={() => {
+ const url = getNavUrl(links[index], auth)
+ if (url) {
+ window.open(`${window.location.origin}${url}`, '_blank', "noopener");
+ } else {
+ dispatch(navigationNotAvailable(links[index]));
+ }
+ }}
+ style={{ cursor: 'pointer' }}>
+ {links[index]}
+ </Link>}
</React.Fragment>
)}
</>;
- };
+};
getInlineFileUrl(enhancedItem.url, config.keepWebServiceUrl, config.keepWebInlineServiceUrl),
true
);
- window.open(fileUrl, "_blank");
+ window.open(fileUrl, "_blank", "noopener");
}
}
if (linkUrl[0] === '/') {
valueNode = <Link to={linkUrl} className={classes.link}>{uuid}</Link>;
} else {
- valueNode = <a href={linkUrl} className={classes.link} target='_blank' rel="noopener noreferrer">{uuid}</a>;
+ valueNode = <a href={linkUrl} className={classes.link} target='_blank' rel="noopener">{uuid}</a>;
}
} else if (link) {
- valueNode = <a href={link} className={classes.link} target='_blank' rel="noopener noreferrer">{value}</a>;
+ valueNode = <a href={link} className={classes.link} target='_blank' rel="noopener">{value}</a>;
} else {
valueNode = value;
}
const url = getNavUrl(resource.uuid, getState().auth);
if (url[0] === "/") {
- window.open(`${window.location.origin}${url}`, "_blank");
+ window.open(`${window.location.origin}${url}`, "_blank", "noopener");
} else if (url.length) {
- window.open(url, "_blank");
+ window.open(url, "_blank", "noopener");
}
};
style={{ textDecoration: 'none' }}
href={props.href}
target="_blank"
- rel="noopener noreferrer"
+ rel="noopener"
onClick={props.onClick}>
<ListItem button>
<ListItemIcon>
</ListItemIcon>
<ListItemText>
Open in new tab
- </ListItemText>
+ </ListItemText>
</ListItem>
</a>
: null;
style={{ textDecoration: 'none' }}
href={fillViewerUrl(fileUrl, viewer)}
onClick={onClick}
+ rel="noopener"
target='_blank'>
<ListItemIcon>
{
{
links.map(link =>
<MenuItem key={link.title}>
- <a href={link.link} target="_blank" rel="noopener noreferrer" className={classes.link}>
+ <a href={link.link} target="_blank" rel="noopener" className={classes.link}>
<ImportContactsIcon className={classes.icon} />
<Typography className={classes.linkTitle}>{link.title}</Typography>
</a>
lines={[snippetText(props.data.uuidPrefix)]} />
<Typography variant='body1' className={props.classes.spacing}>
See also:
- <div><a href="https://doc.arvados.org/user/getting_started/ssh-access-unix.html" className={props.classes.link} target="_blank" rel="noopener noreferrer">SSH access</a></div>
- <div><a href="https://doc.arvados.org/user/tutorials/tutorial-firstscript.html" className={props.classes.link} target="_blank" rel="noopener noreferrer">Writing a Crunch Script</a></div>
+ <div><a href="https://doc.arvados.org/user/getting_started/ssh-access-unix.html" className={props.classes.link} target="_blank" rel="noopener">SSH access</a></div>
+ <div><a href="https://doc.arvados.org/user/tutorials/tutorial-firstscript.html" className={props.classes.link} target="_blank" rel="noopener">Writing a Crunch Script</a></div>
</Typography>
</DialogContent>
<DialogActions>
color='primary'
onClick={props.closeDialog}>
Close
- </Button>
+ </Button>
</DialogActions>
</Dialog>
);
return <Grid container alignItems='center' key={token.uuid} className={props.classes.sharingUrlRow}>
<Grid item>
- <Link className={props.classes.sharingUrlText} href={url} target='_blank'>
+ <Link className={props.classes.sharingUrlText} href={url} target='_blank' rel="noopener">
{urlLabel}
</Link>
</Grid>
The Arvados API token is a secret key that enables the Arvados SDKs to access Arvados with the proper permissions.
<Typography component='span'>
For more information see
- <a href='http://doc.arvados.org/user/reference/api-tokens.html' target='blank' className={classes.link}>
+ <a href='http://doc.arvados.org/user/reference/api-tokens.html' target='blank' rel="noopener" className={classes.link}>
Getting an API token.
</a>
</Typography>
<DetailsAttributeComponent label='API Host' value={data.apiHost} copyValue={data.apiHost} onCopy={this.onCopy} />
<DetailsAttributeComponent label='API Token' value={data.token} copyValue={data.token} onCopy={this.onCopy} />
<DetailsAttributeComponent label='Token expiration' value={tokenExpiration} />
- { this.props.canCreateNewTokens && <Button
+ {this.props.canCreateNewTokens && <Button
onClick={() => this.onGetNewToken()}
color="primary"
size="small"
className={classes.actionButton}
>
GET NEW TOKEN
- </Button> }
+ </Button>}
<Typography paragraph={true}>
Paste the following lines at a shell prompt to set up the necessary environment for Arvados SDKs to authenticate to your account.
</CopyToClipboard>
<Typography>
Arvados
- <a href='http://doc.arvados.org/user/reference/api-tokens.html' target='blank' className={classes.link}>virtual machines</a>
+ <a href='http://doc.arvados.org/user/reference/api-tokens.html' target='blank' rel="noopener" className={classes.link}>virtual machines</a>
do this for you automatically. This setup is needed only when you use the API remotely (e.g., from your own workstation).
</Typography>
</DialogContent>
withStyles(styles)(
connect(getTokenDialogData)(
withDialog(TOKEN_DIALOG_NAME)(TokenDialogComponent)));
-
<DetailsAttribute
label='Internet address'
- value={<a href={winDav.toString()} target="_blank" rel="noopener noreferrer">{winDav.toString()}</a>}
+ value={<a href={winDav.toString()} target="_blank" rel="noopener">{winDav.toString()}</a>}
copyValue={winDav.toString()} />
<DetailsAttribute
<TabPanel index={0} value={activeTab}>
<DetailsAttribute
label='Server'
- value={<a href={cyberDavStr} target="_blank" rel="noopener noreferrer">{cyberDavStr}</a>}
+ value={<a href={cyberDavStr} target="_blank" rel="noopener">{cyberDavStr}</a>}
copyValue={cyberDavStr} />
<DetailsAttribute
className={classes.keepLink}
href={keepUrlPathNav}
target="_blank"
- rel="noopener noreferrer"
+ rel="noopener"
>
{keepUrlPath || "/"}
</a>
<MuiLink
href={file.location}
target="_blank"
+ rel="noopener"
>
{file.location}
</MuiLink>
},
},
logText: {
- padding: `0 ${theme.spacing.unit*0.5}px`,
+ padding: `0 ${theme.spacing.unit * 0.5}px`,
},
wordWrap: {
whiteSpace: 'pre-wrap',
}
return <Typography style={{ fontSize: fontSize }}>
{text.split(REGEX).map((part, index) =>
- <React.Fragment key={index}>
- {part}
- {links[index] &&
- <Link onClick={() => {
- const url = getNavUrl(links[index], auth)
- if (url) {
- window.open(`${window.location.origin}${url}`, '_blank');
- } else {
- dispatch(navigationNotAvailable(links[index]));
- }
- }}
- style={ {cursor: 'pointer'} }>
- {links[index]}
- </Link>}
- </React.Fragment>
+ <React.Fragment key={index}>
+ {part}
+ {links[index] &&
+ <Link onClick={() => {
+ const url = getNavUrl(links[index], auth)
+ if (url) {
+ window.open(`${window.location.origin}${url}`, '_blank', "noopener");
+ } else {
+ dispatch(navigationNotAvailable(links[index]));
+ }
+ }}
+ style={{ cursor: 'pointer' }}>
+ {links[index]}
+ </Link>}
+ </React.Fragment>
)}
</Typography>;
};
});
export const ProcessLogCodeSnippet = withStyles(styles)(connect(mapStateToProps)(
- ({classes, lines, fontSize, auth, dispatch, wordWrap}: ProcessLogCodeSnippetProps & WithStyles<CssRules> & ProcessLogCodeSnippetAuthProps & DispatchProp) => {
+ ({ classes, lines, fontSize, auth, dispatch, wordWrap }: ProcessLogCodeSnippetProps & WithStyles<CssRules> & ProcessLogCodeSnippetAuthProps & DispatchProp) => {
const [followMode, setFollowMode] = useState<boolean>(true);
const scrollRef = useRef<HTMLDivElement>(null);
<div ref={scrollRef} className={classes.root}
onScroll={(e) => {
const elem = e.target as HTMLDivElement;
- if (elem.scrollTop + (elem.clientHeight*1.1) >= elem.scrollHeight) {
+ if (elem.scrollTop + (elem.clientHeight * 1.1) >= elem.scrollHeight) {
setFollowMode(true);
} else {
setFollowMode(false);
}
}}>
- { lines.map((line: string, index: number) =>
- <Typography key={index} component="pre"
- className={classNames(classes.logText, wordWrap ? classes.wordWrap : undefined)}>
- {renderLinks(fontSize, auth, dispatch)(line)}
- </Typography>
- ) }
+ {lines.map((line: string, index: number) =>
+ <Typography key={index} component="pre"
+ className={classNames(classes.logText, wordWrap ? classes.wordWrap : undefined)}>
+ {renderLinks(fontSize, auth, dispatch)(line)}
+ </Typography>
+ )}
</div>
</MuiThemeProvider>
}));
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
- width: '100%',
- overflow: 'auto'
+ width: '100%',
+ overflow: 'auto'
},
link: {
color: theme.palette.primary.main,
<CardContent>
<Grid container direction="row">
<Grid item xs={8}>
- { !hasKeys && <Typography paragraph={true} >
+ {!hasKeys && <Typography paragraph={true} >
You have not yet set up an SSH public key for use with Arvados.
<a href='https://doc.arvados.org/user/getting_started/ssh-access-unix.html'
- target='blank' className={classes.link}>
+ target='blank' rel="noopener" className={classes.link}>
Learn more.
</a>
</Typography>}
- { !hasKeys && <Typography paragraph={true}>
+ {!hasKeys && <Typography paragraph={true}>
When you have an SSH key you would like to use, add it using button below.
- </Typography> }
+ </Typography>}
</Grid>
<Grid item xs={4} className={classes.buttonContainer}>
<Button onClick={openSshKeyCreateDialog} color="primary" variant="contained">
</Grid>
</CardContent>
</Card>
- );
+);
{virtualMachineSendRequest(props)}
</div>
<div className={props.classes.icon}>
- <a href="https://doc.arvados.org/user/getting_started/vm-login-with-webshell.html" target="_blank" rel="noopener noreferrer" className={props.classes.linkIcon}>
+ <a href="https://doc.arvados.org/user/getting_started/vm-login-with-webshell.html" target="_blank" rel="noopener" className={props.classes.linkIcon}>
<Tooltip title="Access VM using webshell">
<HelpIcon />
</Tooltip>
const command = `ssh ${username}@${it.hostname}${props.hostSuffix}`;
let tokenParam = "";
if (props.tokenLocation === SESSION_STORAGE || props.tokenLocation === EXTRA_TOKEN) {
- tokenParam = `&token=${encodeURIComponent(props.token)}`;
+ tokenParam = `&token=${encodeURIComponent(props.token)}`;
}
const loginHref = `/webshell/?host=${encodeURIComponent(props.webshellUrl + '/' + it.hostname)}&timeout=${props.idleTimeout}&login=${encodeURIComponent(username)}${tokenParam}`;
return <TableRow key={lk.uuid}>
<TableCell>
<Grid container spacing={8} className={props.classes.chipsRoot}>
{
- (lk.properties.groups || []).map((group, i) => (
- <Grid item key={i}>
- <Chip label={group} />
- </Grid>
- ))
+ (lk.properties.groups || []).map((group, i) => (
+ <Grid item key={i}>
+ <Chip label={group} />
+ </Grid>
+ ))
}
</Grid>
</TableCell>
size="small"
href={loginHref}
target="_blank"
- rel="noopener noreferrer">
- Log in as {username}
+ rel="noopener">
+ Log in as {username}
</Button>
</TableCell>
</TableRow>;