X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f60f33a2988545fdeb8b3b07d7cefb82c0d884d3..83e7cbb4620d7e7d61c56fb25efc2069955eb78a:/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 dbdf68b693..40ecfc5b38 100644
--- a/services/workbench2/src/components/data-explorer/data-explorer.tsx
+++ b/services/workbench2/src/components/data-explorer/data-explorer.tsx
@@ -16,8 +16,9 @@ import { DataTableFilters } from "components/data-table-filters/data-table-filte
 import { CloseIcon, IconType, MaximizeIcon, UnMaximizeIcon, MoreVerticalIcon } from "components/icon/icon";
 import { PaperProps } from "@material-ui/core/Paper";
 import { MPVPanelProps } from "components/multi-panel-view/multi-panel-view";
+import classNames from "classnames";
 
-type CssRules = "titleWrapper" | "msToolbarStyles" | "subpanelToolbarStyles" | "searchBox" | "headerMenu" | "toolbar" | "footer"| "loadMoreContainer" | "numResults" | "root" | "moreOptionsButton" | "title" | 'subProcessTitle' | "dataTable" | "container";
+type CssRules = "titleWrapper" | "msToolbarStyles" | "subpanelToolbarStyles" | "searchBox" | "headerMenu" | "toolbar" | "footer"| "loadMoreContainer" | "numResults" | "root" | "moreOptionsButton" | "title" | 'subProcessTitle' | 'progressWrapper' | 'progressWrapperNoTitle' | "dataTable" | "container";
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     titleWrapper: {
@@ -74,6 +75,14 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         flexGrow: 0,
         paddingRight: "10px",
     },
+    progressWrapper: {
+        margin: "28px 0 0",
+        flexGrow: 1,
+        flexBasis: "100px",
+    },
+    progressWrapperNoTitle: {
+        paddingLeft: "10px",
+    },
     dataTable: {
         height: "100%",
         overflow: "auto",
@@ -117,6 +126,7 @@ interface DataExplorerDataProps<T> {
     checkedList: TCheckedList;
     isNotFound: boolean;
     searchBarValue: string;
+    paperClassName?: string;
 }
 
 interface DataExplorerActionProps<T> {
@@ -160,6 +170,7 @@ export const DataExplorer = withStyles(styles)(
                 this.setState({
                     msToolbarInDetailsCard: selectedResourceUuid === this.props.currentRouteUuid,
                 })
+            }
             if (this.props.itemsAvailable !== prevProps.itemsAvailable) {
                 this.maxItemsAvailable = Math.max(this.maxItemsAvailable, this.props.itemsAvailable);
             }
@@ -208,10 +219,11 @@ export const DataExplorer = withStyles(styles)(
                 setCheckedListOnStore,
                 checkedList,
                 working,
+                paperClassName,
             } = this.props;
             return (
                 <Paper
-                    className={classes.root}
+                    className={classNames(classes.root, paperClassName)}
                     {...paperProps}
                     key={paperKey}
                     data-cy={this.props["data-cy"]}
@@ -232,7 +244,12 @@ export const DataExplorer = withStyles(styles)(
                                     {title}
                                 </Grid>
                             )}
-                            {!!progressBar && progressBar}
+                            {!!progressBar &&
+                                <div className={classNames({
+                                    [classes.progressWrapper]: true,
+                                    [classes.progressWrapperNoTitle]: !title,
+                                })}>{progressBar}</div>
+                            }
                             {this.multiSelectToolbarInTitle && !this.state.msToolbarInDetailsCard && <MultiselectToolbar injectedStyles={classes.msToolbarStyles} />}
                             {(!hideColumnSelector || !hideSearchInput || !!actions) && (
                                 <Grid
@@ -363,7 +380,7 @@ export const DataExplorer = withStyles(styles)(
                                                 size="small"
                                                 onClick={this.loadMore}
                                                 variant="contained"
-                                                color="primary"  
+                                                color="primary"
                                                 style={{width: '100%', margin: '10px'}}
                                                 disabled={working || items.length >= itemsAvailable}
                                             >
