projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
21386: not found only shows on 404 Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados.git]
/
services
/
workbench2
/
src
/
components
/
data-explorer
/
data-explorer.tsx
diff --git
a/services/workbench2/src/components/data-explorer/data-explorer.tsx
b/services/workbench2/src/components/data-explorer/data-explorer.tsx
index ad5762dfeb1bac4bda716b02ff60bdd646c6dbf0..27e46d584962c8d3e1cb1ca536b21ab1b4577ecf 100644
(file)
--- a/
services/workbench2/src/components/data-explorer/data-explorer.tsx
+++ b/
services/workbench2/src/components/data-explorer/data-explorer.tsx
@@
-17,15
+17,20
@@
import { CloseIcon, IconType, MaximizeIcon, UnMaximizeIcon, MoreVerticalIcon } f
import { PaperProps } from "@material-ui/core/Paper";
import { MPVPanelProps } from "components/multi-panel-view/multi-panel-view";
import { PaperProps } from "@material-ui/core/Paper";
import { MPVPanelProps } from "components/multi-panel-view/multi-panel-view";
-type CssRules = "
searchBox" | "headerMenu" | "toolbar" | "footer" | "root" | "moreOptionsButton" | "title"
| "dataTable" | "container";
+type CssRules = "
titleWrapper" | "searchBox" | "headerMenu" | "toolbar" | "footer" | "root" | "moreOptionsButton" | "title" | 'subProcessTitle'
| "dataTable" | "container";
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ titleWrapper: {
+ display: "flex",
+ justifyContent: "space-between",
+ },
searchBox: {
paddingBottom: 0,
},
toolbar: {
paddingTop: 0,
paddingRight: theme.spacing.unit,
searchBox: {
paddingBottom: 0,
},
toolbar: {
paddingTop: 0,
paddingRight: theme.spacing.unit,
+ paddingLeft: "10px",
},
footer: {
overflow: "auto",
},
footer: {
overflow: "auto",
@@
-41,6
+46,15
@@
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
paddingLeft: theme.spacing.unit * 2,
paddingTop: theme.spacing.unit * 2,
fontSize: "18px",
paddingLeft: theme.spacing.unit * 2,
paddingTop: theme.spacing.unit * 2,
fontSize: "18px",
+ paddingRight: "10px",
+ },
+ subProcessTitle: {
+ display: "inline-block",
+ paddingLeft: theme.spacing.unit * 2,
+ paddingTop: theme.spacing.unit * 2,
+ fontSize: "18px",
+ flexGrow: 0,
+ paddingRight: "10px",
},
dataTable: {
height: "100%",
},
dataTable: {
height: "100%",
@@
-50,11
+64,9
@@
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
height: "100%",
},
headerMenu: {
height: "100%",
},
headerMenu: {
- width: "100%",
- float: "right",
- display: "flex",
- flexDirection: "row-reverse",
- justifyContent: "space-between",
+ marginLeft: "auto",
+ flexBasis: "initial",
+ flexGrow: 0,
},
});
},
});
@@
-79,6
+91,7
@@
interface DataExplorerDataProps<T> {
actions?: React.ReactNode;
hideSearchInput?: boolean;
title?: React.ReactNode;
actions?: React.ReactNode;
hideSearchInput?: boolean;
title?: React.ReactNode;
+ progressBar?: React.ReactNode;
paperKey?: string;
currentItemUuid: string;
elementPath?: string;
paperKey?: string;
currentItemUuid: string;
elementPath?: string;
@@
-113,6
+126,8
@@
export const DataExplorer = withStyles(styles)(
prevRoute: "",
};
prevRoute: "",
};
+ multiSelectToolbarInTitle = !this.props.title && !this.props.progressBar;
+
componentDidUpdate(prevProps: DataExplorerProps<T>) {
const currentRefresh = this.props.currentRefresh || "";
const currentRoute = this.props.currentRoute || "";
componentDidUpdate(prevProps: DataExplorerProps<T>) {
const currentRefresh = this.props.currentRefresh || "";
const currentRoute = this.props.currentRoute || "";
@@
-180,7
+195,9
@@
export const DataExplorer = withStyles(styles)(
paperKey,
fetchMode,
currentItemUuid,
paperKey,
fetchMode,
currentItemUuid,
+ currentRoute,
title,
title,
+ progressBar,
doHidePanel,
doMaximizePanel,
doUnMaximizePanel,
doHidePanel,
doMaximizePanel,
doUnMaximizePanel,
@@
-204,16
+221,18
@@
export const DataExplorer = withStyles(styles)(
wrap="nowrap"
className={classes.container}
>
wrap="nowrap"
className={classes.container}
>
- <div>
+ <div
className={classes.titleWrapper} style={currentRoute?.includes('search-results') || !!progressBar ? {marginBottom: '-20px'} : {}}
>
{title && (
<Grid
item
xs
{title && (
<Grid
item
xs
- className={classes.title}
+ className={
!!progressBar ? classes.subProcessTitle :
classes.title}
>
{title}
</Grid>
)}
>
{title}
</Grid>
)}
+ {!!progressBar && progressBar}
+ {this.multiSelectToolbarInTitle && <MultiselectToolbar />}
{(!hideColumnSelector || !hideSearchInput || !!actions) && (
<Grid
className={classes.headerMenu}
{(!hideColumnSelector || !hideSearchInput || !!actions) && (
<Grid
className={classes.headerMenu}
@@
-221,25
+240,27
@@
export const DataExplorer = withStyles(styles)(
xs
>
<Toolbar className={classes.toolbar}>
xs
>
<Toolbar className={classes.toolbar}>
- {!hideSearchInput && (
- <div className={classes.searchBox}>
- {!hideSearchInput && (
- <SearchInput
- label={searchLabel}
- value={searchValue}
- selfClearProp={""}
- onSearch={onSearch}
- />
- )}
- </div>
- )}
- {actions}
- {!hideColumnSelector && (
- <ColumnSelector
- columns={columns}
- onColumnToggle={onColumnToggle}
- />
- )}
+ <Grid container justify="space-between" wrap="nowrap" alignItems="center">
+ {!hideSearchInput && (
+ <div className={classes.searchBox}>
+ {!hideSearchInput && (
+ <SearchInput
+ label={searchLabel}
+ value={searchValue}
+ selfClearProp={""}
+ onSearch={onSearch}
+ />
+ )}
+ </div>
+ )}
+ {actions}
+ {!hideColumnSelector && (
+ <ColumnSelector
+ columns={columns}
+ onColumnToggle={onColumnToggle}
+ />
+ )}
+ </Grid>
{doUnMaximizePanel && panelMaximized && (
<Tooltip
title={`Unmaximize ${panelName || "panel"}`}
{doUnMaximizePanel && panelMaximized && (
<Tooltip
title={`Unmaximize ${panelName || "panel"}`}
@@
-274,14
+295,15
@@
export const DataExplorer = withStyles(styles)(
</Tooltip>
)}
</Toolbar>
</Tooltip>
)}
</Toolbar>
- <MultiselectToolbar />
</Grid>
)}
</div>
</Grid>
)}
</div>
+ {!this.multiSelectToolbarInTitle && <MultiselectToolbar />}
<Grid
item
xs="auto"
className={classes.dataTable}
<Grid
item
xs="auto"
className={classes.dataTable}
+ style={currentRoute?.includes('search-results') || !!progressBar ? {marginTop: '-10px'} : {}}
>
<DataTable
columns={this.props.contextMenuColumn ? [...columns, this.contextMenuColumn] : columns}
>
<DataTable
columns={this.props.contextMenuColumn ? [...columns, this.contextMenuColumn] : columns}
@@
-368,7
+390,10
@@
export const DataExplorer = withStyles(styles)(
>
<IconButton
className={this.props.classes.moreOptionsButton}
>
<IconButton
className={this.props.classes.moreOptionsButton}
- onClick={event => this.props.onContextMenu(event, item)}
+ onClick={event => {
+ event.stopPropagation()
+ this.props.onContextMenu(event, item)
+ }}
>
<MoreVerticalIcon />
</IconButton>
>
<MoreVerticalIcon />
</IconButton>