// SPDX-License-Identifier: AGPL-3.0
export function getUrlParameter(search: string, name: string) {
- const safeName = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+ const safeName = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
const regex = new RegExp('[\\?&]' + safeName + '=([^&#]*)');
const results = regex.exec(search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
// For some reason, on TSX files it isn't accepted just one generic param, so
// I'm using <T, _> as a workaround.
+// eslint-disable-next-line
export const Row = <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProps: TreeProps<T>) => withStyles(styles)(
(props: React.PropsWithChildren<ListChildComponentProps> & WithStyles<CssRules>) => {
const { index, style, classes } = props;
const itemSize = 30;
+// eslint-disable-next-line
export const VirtualList = <T, _>(height: number, width: number, items: VirtualTreeItem<T>[], render: any, treeProps: TreeProps<T>) =>
<FixedSizeList
height={height}
};
export const extractFilesData = (document: Document) => {
- const collectionUrlPrefix = /\/c=([^\/]*)/;
+ const collectionUrlPrefix = /\/c=([^/]*)/;
return Array
.from(document.getElementsByTagName('D:response'))
.slice(1) // omit first element which is collection itself
export type WithDialogProps<T> = WithDialogStateProps<T> & WithDialogDispatchProps;
export const withDialog = (id: string) =>
// TODO: How to make compiler happy with & P instead of & any?
+ // eslint-disable-next-line
<T, P>(component: React.ComponentType<WithDialogProps<T> & any>) =>
connect(mapStateToProps(id), mapDispatchToProps(id))(component);
}
const fedtoken = (remoteHostsConfig[k].loginCluster === localCluster)
? apiToken : getSaltedToken(k, apiToken);
- return <iframe key={k} src={`${remoteHostsConfig[k].workbench2Url}/fedtoken?api_token=${fedtoken}`} style={{
+ return <iframe key={k} title={k} src={`${remoteHostsConfig[k].workbench2Url}/fedtoken?api_token=${fedtoken}`} style={{
height: 0,
width: 0,
visibility: "hidden"
export const WorkbenchLoadingScreen = withStyles(styles)(({ classes }: WithStyles<CssRules>) =>
<Grid container direction="column" alignItems='center' justify='center' className={classes.root}>
- <img src='/arvados_logo.png' className={classes.img} />
+ <img src='/arvados_logo.png' alt='Arvados logo' className={classes.img} />
<CircularProgress data-cy='loading-spinner' />
</Grid>
);