X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/9858ad74ab6f81c55c06c8f05b20ccd0ec67dd7a..62cb779efb0b098c05053e957c765a807467b28b:/src/components/data-explorer/data-explorer.tsx diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx index 0363d333..e4eef593 100644 --- a/src/components/data-explorer/data-explorer.tsx +++ b/src/components/data-explorer/data-explorer.tsx @@ -11,7 +11,13 @@ import { SearchInput } from 'components/search-input/search-input'; import { ArvadosTheme } from "common/custom-theme"; import { createTree } from 'models/tree'; import { DataTableFilters } from 'components/data-table-filters/data-table-filters-tree'; -import { CloseIcon, MaximizeIcon, MoreOptionsIcon } from 'components/icon/icon'; +import { + CloseIcon, + IconType, + MaximizeIcon, + UnMaximizeIcon, + MoreOptionsIcon +} from 'components/icon/icon'; import { PaperProps } from '@material-ui/core/Paper'; import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view'; @@ -19,11 +25,11 @@ type CssRules = 'searchBox' | 'headerMenu' | "toolbar" | "footer" | "root" | 'mo const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ searchBox: { - paddingBottom: theme.spacing.unit * 2 + paddingBottom: 0, }, toolbar: { - paddingTop: theme.spacing.unit, - paddingRight: theme.spacing.unit * 2, + paddingTop: 0, + paddingRight: theme.spacing.unit, }, footer: { overflow: 'auto' @@ -36,8 +42,8 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, title: { display: 'inline-block', - paddingLeft: theme.spacing.unit * 3, - paddingTop: theme.spacing.unit * 3, + paddingLeft: theme.spacing.unit * 2, + paddingTop: theme.spacing.unit * 2, fontSize: '18px' }, dataTable: { @@ -49,7 +55,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, headerMenu: { float: 'right', - display: 'inline-block' + display: 'inline-block', } }); @@ -64,7 +70,8 @@ interface DataExplorerDataProps { rowsPerPageOptions: number[]; page: number; contextMenuColumn: boolean; - dataTableDefaultView?: React.ReactNode; + defaultViewIcon?: IconType; + defaultViewMessages?: string[]; working?: boolean; currentRefresh?: string; currentRoute?: string; @@ -149,11 +156,10 @@ export const DataExplorer = withStyles(styles)( columns, onContextMenu, onFiltersChange, onSortToggle, extractKey, rowsPerPage, rowsPerPageOptions, onColumnToggle, searchLabel, searchValue, onSearch, items, itemsAvailable, onRowClick, onRowDoubleClick, classes, - dataTableDefaultView, hideColumnSelector, actions, paperProps, hideSearchInput, + defaultViewIcon, defaultViewMessages, hideColumnSelector, actions, paperProps, hideSearchInput, paperKey, fetchMode, currentItemUuid, title, - doHidePanel, doMaximizePanel, panelName, panelMaximized, elementPath + doHidePanel, doMaximizePanel, doUnMaximizePanel, panelName, panelMaximized, elementPath } = this.props; - return
@@ -162,26 +168,28 @@ export const DataExplorer = withStyles(styles)( (!hideColumnSelector || !hideSearchInput || !!actions) && - - {!hideSearchInput &&
- {!hideSearchInput && } -
} - {actions} - {!hideColumnSelector && } -
+ {!hideSearchInput &&
+ {!hideSearchInput && } +
} + {actions} + {!hideColumnSelector && } + { doUnMaximizePanel && panelMaximized && + + + } { doMaximizePanel && !panelMaximized && } { doHidePanel && - + }
@@ -197,7 +205,8 @@ export const DataExplorer = withStyles(styles)( onSortToggle={onSortToggle} extractKey={extractKey} working={this.state.showLoading} - defaultView={dataTableDefaultView} + defaultViewIcon={defaultViewIcon} + defaultViewMessages={defaultViewMessages} currentItemUuid={currentItemUuid} currentRoute={paperKey} />