X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6b9cb6715bb7c04b2a425bc28b41a51f8a273a7a..2bbea832f0a7a16e70b85b2e2ad9ca4637a80118:/services/workbench2/src/views/process-panel/process-log-code-snippet.tsx diff --git a/services/workbench2/src/views/process-panel/process-log-code-snippet.tsx b/services/workbench2/src/views/process-panel/process-log-code-snippet.tsx index 091078c452..f42dcaf542 100644 --- a/services/workbench2/src/views/process-panel/process-log-code-snippet.tsx +++ b/services/workbench2/src/views/process-panel/process-log-code-snippet.tsx @@ -33,7 +33,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, }, logText: { - padding: `0 ${theme.spacing.unit*0.5}px`, + padding: `0 ${theme.spacing.unit * 0.5}px`, }, wordWrapOn: { overflowWrap: 'anywhere', @@ -76,21 +76,21 @@ const renderLinks = (fontSize: number, auth: FederationConfig, dispatch: Dispatc } return {text.split(REGEX).map((part, index) => - - {part} - {links[index] && - { - 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]} - } - + + {part} + {links[index] && + { + 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]} + } + )} ; }; @@ -100,7 +100,7 @@ const mapStateToProps = (state: RootState): ProcessLogCodeSnippetAuthProps => ({ }); export const ProcessLogCodeSnippet = withStyles(styles)(connect(mapStateToProps)( - ({classes, lines, fontSize, auth, dispatch, wordWrap}: ProcessLogCodeSnippetProps & WithStyles & ProcessLogCodeSnippetAuthProps & DispatchProp) => { + ({ classes, lines, fontSize, auth, dispatch, wordWrap }: ProcessLogCodeSnippetProps & WithStyles & ProcessLogCodeSnippetAuthProps & DispatchProp) => { const [followMode, setFollowMode] = useState(true); const scrollRef = useRef(null); @@ -115,18 +115,18 @@ export const ProcessLogCodeSnippet = withStyles(styles)(connect(mapStateToProps)
{ 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) => - - {renderLinks(fontSize, auth, dispatch)(line)} - - ) } + {lines.map((line: string, index: number) => + + {renderLinks(fontSize, auth, dispatch)(line)} + + )}
}));