From 148f9fba3eede1027ceb07657c4c7eaaa244d6d8 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Thu, 2 Jun 2022 22:37:55 -0400 Subject: [PATCH] 18984: Refactor default data table view, add active filters notice to default view Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- .../data-explorer/data-explorer.tsx | 10 ++++++---- .../data-table-default-view.tsx | 5 +++-- src/components/data-table/data-table.tsx | 19 +++++++++++-------- src/components/default-view/default-view.tsx | 3 ++- src/models/tree.ts | 14 +++++++++++++- .../all-processes-panel.tsx | 7 ++----- .../api-client-authorization-panel-root.tsx | 11 ++++------- .../collection-content-address-panel.tsx | 11 ++++------- src/views/favorite-panel/favorite-panel.tsx | 10 +++------- .../group-details-panel.tsx | 9 ++++++++- src/views/link-panel/link-panel-root.tsx | 11 ++++------- src/views/project-panel/project-panel.tsx | 9 +++------ .../public-favorites-panel.tsx | 9 +++------ .../shared-with-me-panel.tsx | 9 +++------ .../subprocess-panel-root.tsx | 10 +++------- src/views/trash-panel/trash-panel.tsx | 9 +++------ src/views/user-panel/user-panel.tsx | 8 ++------ .../user-profile-panel-root.tsx | 8 ++------ .../workflow-panel/workflow-panel-view.tsx | 4 ++-- 19 files changed, 81 insertions(+), 95 deletions(-) diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx index 0363d333..40617f73 100644 --- a/src/components/data-explorer/data-explorer.tsx +++ b/src/components/data-explorer/data-explorer.tsx @@ -11,7 +11,7 @@ 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, MoreOptionsIcon } from 'components/icon/icon'; import { PaperProps } from '@material-ui/core/Paper'; import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view'; @@ -64,7 +64,8 @@ interface DataExplorerDataProps { rowsPerPageOptions: number[]; page: number; contextMenuColumn: boolean; - dataTableDefaultView?: React.ReactNode; + defaultViewIcon?: IconType; + defaultViewMessages?: string[]; working?: boolean; currentRefresh?: string; currentRoute?: string; @@ -149,7 +150,7 @@ 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 } = this.props; @@ -197,7 +198,8 @@ export const DataExplorer = withStyles(styles)( onSortToggle={onSortToggle} extractKey={extractKey} working={this.state.showLoading} - defaultView={dataTableDefaultView} + defaultViewIcon={defaultViewIcon} + defaultViewMessages={defaultViewMessages} currentItemUuid={currentItemUuid} currentRoute={paperKey} /> diff --git a/src/components/data-table-default-view/data-table-default-view.tsx b/src/components/data-table-default-view/data-table-default-view.tsx index 2869ab82..b245c19b 100644 --- a/src/components/data-table-default-view/data-table-default-view.tsx +++ b/src/components/data-table-default-view/data-table-default-view.tsx @@ -16,12 +16,13 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ marginBottom: theme.spacing.unit * 4, }, }); -type DataTableDefaultViewDataProps = Partial>; +type DataTableDefaultViewDataProps = Partial>; type DataTableDefaultViewProps = DataTableDefaultViewDataProps & WithStyles; export const DataTableDefaultView = withStyles(styles)( ({ classes, ...props }: DataTableDefaultViewProps) => { const icon = props.icon || DetailsIcon; - const messages = props.messages || ['No items found']; + const filterWarning: string[] = props.filtersApplied ? ['Filters are applied to the data.'] : []; + const messages = filterWarning.concat(props.messages || ['No items found']); return ; }); diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx index 14dfdaca..d942234d 100644 --- a/src/components/data-table/data-table.tsx +++ b/src/components/data-table/data-table.tsx @@ -9,8 +9,8 @@ import { DataColumn, SortDirection } from './data-column'; import { DataTableDefaultView } from '../data-table-default-view/data-table-default-view'; import { DataTableFilters } from '../data-table-filters/data-table-filters-tree'; import { DataTableFiltersPopover } from '../data-table-filters/data-table-filters-popover'; -import { countNodes } from 'models/tree'; -import { PendingIcon } from 'components/icon/icon'; +import { countNodes, getTreeDirty } from 'models/tree'; +import { IconType, PendingIcon } from 'components/icon/icon'; import { SvgIconProps } from '@material-ui/core/SvgIcon'; import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward'; @@ -31,7 +31,8 @@ export interface DataTableDataProps { onFiltersChange: (filters: DataTableFilters, column: DataColumn) => void; extractKey?: (item: T) => React.Key; working?: boolean; - defaultView?: React.ReactNode; + defaultViewIcon?: IconType; + defaultViewMessages?: string[]; currentItemUuid?: string; currentRoute?: string; } @@ -105,15 +106,17 @@ export const DataTable = withStyles(styles)( icon={PendingIcon} messages={['Loading data, please wait.']} /> } - {items.length === 0 && !working && this.renderNoItemsPlaceholder()} + {items.length === 0 && !working && this.renderNoItemsPlaceholder(this.props.columns)} ; } - renderNoItemsPlaceholder = () => { - return this.props.defaultView - ? this.props.defaultView - : ; + renderNoItemsPlaceholder = (columns: DataColumns) => { + const dirty = columns.some((column) => getTreeDirty('')(column.filters)); + return ; } renderHeadCell = (column: DataColumn, index: number) => { diff --git a/src/components/default-view/default-view.tsx b/src/components/default-view/default-view.tsx index 6e89db25..014b8cc4 100644 --- a/src/components/default-view/default-view.tsx +++ b/src/components/default-view/default-view.tsx @@ -27,6 +27,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ export interface DefaultViewDataProps { classRoot?: string; messages: string[]; + filtersApplied?: boolean; classMessage?: string; icon: IconType; classIcon?: string; @@ -43,4 +44,4 @@ export const DefaultView = withStyles(styles)( className={classnames([classes.message, classMessage])}>{msg}; })} -); \ No newline at end of file +); diff --git a/src/models/tree.ts b/src/models/tree.ts index 4a52d61a..996f98a4 100644 --- a/src/models/tree.ts +++ b/src/models/tree.ts @@ -198,6 +198,19 @@ export const initTreeNode = (data: Pick, 'id' | 'value'> & { pare ...data, }); +export const getTreeDirty = (id: string) => (tree: Tree): boolean => { + const node = getNode(id)(tree); + const children = getNodeDescendants(id)(tree); + return (node + && node.initialState !== undefined + && node.selected !== node.initialState + ) + || children.some(child => + child.initialState !== undefined + && child.selected !== child.initialState + ); +} + const toggleDescendantsSelection = (id: string) => (tree: Tree) => { const node = getNode(id)(tree); if (node) { @@ -229,7 +242,6 @@ const toggleParentNodeSelection = (id: string) => (tree: Tree) => { return tree; }; - const mapNodeValue = (mapFn: (value: T) => R) => (node: TreeNode): TreeNode => ({ ...node, value: mapFn(node.value) }); diff --git a/src/views/all-processes-panel/all-processes-panel.tsx b/src/views/all-processes-panel/all-processes-panel.tsx index b06b08e4..0e08a879 100644 --- a/src/views/all-processes-panel/all-processes-panel.tsx +++ b/src/views/all-processes-panel/all-processes-panel.tsx @@ -27,7 +27,6 @@ import { loadDetailsPanel } from 'store/details-panel/details-panel-action'; import { navigateTo } from 'store/navigation/navigation-action'; import { ContainerRequestState } from "models/container-request"; import { RootState } from 'store/store'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { createTree } from 'models/tree'; import { getInitialProcessStatusFilters, getInitialProcessTypeFilters } from 'store/resource-type-filters/resource-type-filters'; import { getProcess } from 'store/processes/process'; @@ -151,10 +150,8 @@ export const AllProcessesPanel = withStyles(styles)( onRowDoubleClick={this.handleRowDoubleClick} onContextMenu={this.handleContextMenu} contextMenuColumn={true} - dataTableDefaultView={ } /> + defaultViewIcon={ProcessIcon} + defaultViewMessages={['Processes list empty.']} /> } } diff --git a/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx b/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx index 8f87cb26..ddca138c 100644 --- a/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx +++ b/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx @@ -11,7 +11,6 @@ import { ShareMeIcon } from 'components/icon/icon'; import { createTree } from 'models/tree'; import { DataColumns } from 'components/data-table/data-table'; import { SortDirection } from 'components/data-table/data-column'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { API_CLIENT_AUTHORIZATION_PANEL_ID } from '../../store/api-client-authorizations/api-client-authorizations-actions'; import { DataExplorer } from 'views-components/data-explorer/data-explorer'; import { ResourcesState } from 'store/resources/resources'; @@ -141,9 +140,7 @@ export const ApiClientAuthorizationPanelRoot = withStyles(styles)( contextMenuColumn={true} hideColumnSelector hideSearchInput - dataTableDefaultView={ - - } /> -); \ No newline at end of file + defaultViewIcon={ShareMeIcon} + defaultViewMessages={[DEFAULT_MESSAGE]} /> + +); diff --git a/src/views/collection-content-address-panel/collection-content-address-panel.tsx b/src/views/collection-content-address-panel/collection-content-address-panel.tsx index f1278049..8e8266cc 100644 --- a/src/views/collection-content-address-panel/collection-content-address-panel.tsx +++ b/src/views/collection-content-address-panel/collection-content-address-panel.tsx @@ -12,7 +12,6 @@ import { import { CollectionIcon } from 'components/icon/icon'; import { ArvadosTheme } from 'common/custom-theme'; import { BackIcon } from 'components/icon/icon'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { COLLECTIONS_CONTENT_ADDRESS_PANEL_ID } from 'store/collections-content-address-panel/collections-content-address-panel-actions'; import { DataExplorer } from "views-components/data-explorer/data-explorer"; import { Dispatch } from 'redux'; @@ -165,12 +164,10 @@ export const CollectionsContentAddressPanel = withStyles(styles)( onContextMenu={this.props.onContextMenu(this.props.resources)} contextMenuColumn={true} title={`Content address: ${this.props.match.params.id}`} - dataTableDefaultView={ - - } /> - ; + defaultViewIcon={CollectionIcon} + defaultViewMessages={['Collections with this content address not found.']} /> + + ; } } ) diff --git a/src/views/favorite-panel/favorite-panel.tsx b/src/views/favorite-panel/favorite-panel.tsx index e520a59c..cb02f1ad 100644 --- a/src/views/favorite-panel/favorite-panel.tsx +++ b/src/views/favorite-panel/favorite-panel.tsx @@ -31,7 +31,6 @@ import { navigateTo } from 'store/navigation/navigation-action'; import { ContainerRequestState } from "models/container-request"; import { FavoritesState } from 'store/favorites/favorites-reducer'; import { RootState } from 'store/store'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { createTree } from 'models/tree'; import { getSimpleObjectTypeFilters } from 'store/resource-type-filters/resource-type-filters'; import { getResource, ResourcesState } from 'store/resources/resources'; @@ -185,12 +184,9 @@ export const FavoritePanel = withStyles(styles)( onRowDoubleClick={this.handleRowDoubleClick} onContextMenu={this.handleContextMenu} contextMenuColumn={true} - dataTableDefaultView={ - - } />; + defaultViewIcon={FavoriteIcon} + defaultViewMessages={['Your favorites list is empty.']} /> + ; } } ) diff --git a/src/views/group-details-panel/group-details-panel.tsx b/src/views/group-details-panel/group-details-panel.tsx index 9cee3cbc..9ebf4626 100644 --- a/src/views/group-details-panel/group-details-panel.tsx +++ b/src/views/group-details-panel/group-details-panel.tsx @@ -15,7 +15,7 @@ import { GROUP_DETAILS_MEMBERS_PANEL_ID, GROUP_DETAILS_PERMISSIONS_PANEL_ID, ope import { openContextMenu } from 'store/context-menu/context-menu-actions'; import { ResourcesState, getResource } from 'store/resources/resources'; import { Grid, Button, Tabs, Tab, Paper, WithStyles, withStyles, StyleRulesCallback } from '@material-ui/core'; -import { AddIcon } from 'components/icon/icon'; +import { AddIcon, UserPanelIcon, KeyIcon } from 'components/icon/icon'; import { getUserUuid } from 'common/getuser'; import { GroupResource, isBuiltinGroup } from 'models/group'; import { ArvadosTheme } from 'common/custom-theme'; @@ -44,6 +44,9 @@ export enum GroupDetailsPanelPermissionsColumnNames { REMOVE = "Remove", } +const MEMBERS_DEFAULT_MESSAGE = 'Members list is empty.'; +const PERMISSIONS_DEFAULT_MESSAGE = 'Permissions list is empty.'; + export const groupDetailsMembersPanelColumns: DataColumns = [ { name: GroupDetailsPanelMembersColumnNames.FULL_NAME, @@ -173,6 +176,8 @@ export const GroupDetailsPanel = withStyles(styles)(connect( onRowDoubleClick={noop} onContextMenu={noop} contextMenuColumn={false} + defaultViewIcon={UserPanelIcon} + defaultViewMessages={[MEMBERS_DEFAULT_MESSAGE]} hideColumnSelector hideSearchInput actions={ @@ -199,6 +204,8 @@ export const GroupDetailsPanel = withStyles(styles)(connect( onRowDoubleClick={noop} onContextMenu={noop} contextMenuColumn={false} + defaultViewIcon={KeyIcon} + defaultViewMessages={[PERMISSIONS_DEFAULT_MESSAGE]} hideColumnSelector hideSearchInput paperProps={{ diff --git a/src/views/link-panel/link-panel-root.tsx b/src/views/link-panel/link-panel-root.tsx index b32208cd..c24d4637 100644 --- a/src/views/link-panel/link-panel-root.tsx +++ b/src/views/link-panel/link-panel-root.tsx @@ -7,7 +7,6 @@ import { LINK_PANEL_ID } from 'store/link-panel/link-panel-actions'; import { DataExplorer } from 'views-components/data-explorer/data-explorer'; import { SortDirection } from 'components/data-table/data-column'; import { DataColumns } from 'components/data-table/data-table'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { ResourcesState } from 'store/resources/resources'; import { ShareMeIcon } from 'components/icon/icon'; import { createTree } from 'models/tree'; @@ -94,9 +93,7 @@ export const LinkPanelRoot = withStyles(styles)((props: LinkPanelRootProps) => { contextMenuColumn={true} hideColumnSelector hideSearchInput - dataTableDefaultView={ - - }/>; -}); \ No newline at end of file + defaultViewIcon={ShareMeIcon} + defaultViewMessages={['Your link list is empty.']} /> + ; +}); diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx index fb5b6205..e0fcb48c 100644 --- a/src/views/project-panel/project-panel.tsx +++ b/src/views/project-panel/project-panel.tsx @@ -36,7 +36,6 @@ import { import { navigateTo } from 'store/navigation/navigation-action'; import { getProperty } from 'store/properties/properties'; import { PROJECT_PANEL_CURRENT_UUID } from 'store/project-panel/project-panel-action'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { ArvadosTheme } from "common/custom-theme"; import { createTree } from 'models/tree'; import { @@ -155,11 +154,9 @@ export const ProjectPanel = withStyles(styles)( onRowDoubleClick={this.handleRowDoubleClick} onContextMenu={this.handleContextMenu} contextMenuColumn={true} - dataTableDefaultView={ - - } /> + defaultViewIcon={ProjectIcon} + defaultViewMessages={DEFAULT_VIEW_MESSAGES} + /> ; } diff --git a/src/views/public-favorites-panel/public-favorites-panel.tsx b/src/views/public-favorites-panel/public-favorites-panel.tsx index 9b1e9102..8eb2a87c 100644 --- a/src/views/public-favorites-panel/public-favorites-panel.tsx +++ b/src/views/public-favorites-panel/public-favorites-panel.tsx @@ -30,7 +30,6 @@ import { loadDetailsPanel } from 'store/details-panel/details-panel-action'; import { navigateTo } from 'store/navigation/navigation-action'; import { ContainerRequestState } from "models/container-request"; import { RootState } from 'store/store'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { createTree } from 'models/tree'; import { getSimpleObjectTypeFilters } from 'store/resource-type-filters/resource-type-filters'; import { PUBLIC_FAVORITE_PANEL_ID } from 'store/public-favorites-panel/public-favorites-action'; @@ -169,11 +168,9 @@ export const PublicFavoritePanel = withStyles(styles)( onRowDoubleClick={this.props.onItemDoubleClick} onContextMenu={this.props.onContextMenu(this.props.resources)} contextMenuColumn={true} - dataTableDefaultView={ - - } />; + defaultViewIcon={PublicFavoriteIcon} + defaultViewMessages={['Public favorites list is empty.']} /> + ; } } ) diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx index 7ba9077c..e6cfccd2 100644 --- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx +++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx @@ -12,7 +12,6 @@ import { ShareMeIcon } from 'components/icon/icon'; import { ResourcesState, getResource } from 'store/resources/resources'; import { navigateTo } from "store/navigation/navigation-action"; import { loadDetailsPanel } from "store/details-panel/details-panel-action"; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { SHARED_WITH_ME_PANEL_ID } from 'store/shared-with-me-panel/shared-with-me-panel-actions'; import { openContextMenu, @@ -55,11 +54,9 @@ export const SharedWithMePanel = withStyles(styles)( onRowDoubleClick={this.handleRowDoubleClick} onContextMenu={this.handleContextMenu} contextMenuColumn={false} - dataTableDefaultView={ - - } />; + defaultViewIcon={ShareMeIcon} + defaultViewMessages={['No shared items']} /> + ; } handleContextMenu = (event: React.MouseEvent, resourceUuid: string) => { diff --git a/src/views/subprocess-panel/subprocess-panel-root.tsx b/src/views/subprocess-panel/subprocess-panel-root.tsx index 41a8f66b..d4ccae9c 100644 --- a/src/views/subprocess-panel/subprocess-panel-root.tsx +++ b/src/views/subprocess-panel/subprocess-panel-root.tsx @@ -13,7 +13,6 @@ import { ResourceCreatedAtDate, ProcessStatus, ContainerRunTime } from 'views-co import { ProcessIcon } from 'components/icon/icon'; import { ResourceName } from 'views-components/data-explorer/renderers'; import { SUBPROCESS_PANEL_ID } from 'store/subprocess-panel/subprocess-panel-actions'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { createTree } from 'models/tree'; import { getInitialProcessStatusFilters } from 'store/resource-type-filters/resource-type-filters'; import { ResourcesState } from 'store/resources/resources'; @@ -88,13 +87,10 @@ export const SubprocessPanelRoot = (props: SubprocessPanelProps & MPVPanelProps) onRowDoubleClick={props.onItemDoubleClick} onContextMenu={(event, item) => props.onContextMenu(event, item, props.resources)} contextMenuColumn={true} - dataTableDefaultView={ - - } + defaultViewIcon={ProcessIcon} + defaultViewMessages={DEFAULT_VIEW_MESSAGES} doHidePanel={props.doHidePanel} doMaximizePanel={props.doMaximizePanel} panelMaximized={props.panelMaximized} panelName={props.panelName} />; -}; \ No newline at end of file +}; diff --git a/src/views/trash-panel/trash-panel.tsx b/src/views/trash-panel/trash-panel.tsx index d303c2f7..67326829 100644 --- a/src/views/trash-panel/trash-panel.tsx +++ b/src/views/trash-panel/trash-panel.tsx @@ -30,7 +30,6 @@ import { loadDetailsPanel } from "store/details-panel/details-panel-action"; import { toggleTrashed } from "store/trash/trash-actions"; import { ContextMenuKind } from "views-components/context-menu/context-menu"; import { Dispatch } from "redux"; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { createTree } from 'models/tree'; import { getTrashPanelTypeFilters @@ -155,11 +154,9 @@ export const TrashPanel = withStyles(styles)( onRowDoubleClick={this.handleRowDoubleClick} onContextMenu={this.handleContextMenu} contextMenuColumn={false} - dataTableDefaultView={ - - } />; + defaultViewIcon={TrashIcon} + defaultViewMessages={['Your trash list is empty.']} /> + ; } handleContextMenu = (event: React.MouseEvent, resourceUuid: string) => { diff --git a/src/views/user-panel/user-panel.tsx b/src/views/user-panel/user-panel.tsx index 589353cd..f2491dc2 100644 --- a/src/views/user-panel/user-panel.tsx +++ b/src/views/user-panel/user-panel.tsx @@ -20,7 +20,6 @@ import { UserResourceAccountStatus, } from "views-components/data-explorer/renderers"; import { navigateToUserProfile } from "store/navigation/navigation-action"; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { createTree } from 'models/tree'; import { compose, Dispatch } from 'redux'; import { UserResource } from 'models/user'; @@ -148,11 +147,8 @@ export const UserPanel = compose( paperProps={{ elevation: 0, }} - dataTableDefaultView={ - - } /> + defaultViewIcon={ShareMeIcon} + defaultViewMessages={['Your user list is empty.']} /> ; } diff --git a/src/views/user-profile-panel/user-profile-panel-root.tsx b/src/views/user-profile-panel/user-profile-panel-root.tsx index 1c8b1da7..53c0799f 100644 --- a/src/views/user-profile-panel/user-profile-panel-root.tsx +++ b/src/views/user-profile-panel/user-profile-panel-root.tsx @@ -24,7 +24,6 @@ import { IconButton, } from '@material-ui/core'; import { ArvadosTheme } from 'common/custom-theme'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { PROFILE_EMAIL_VALIDATION, PROFILE_URL_VALIDATION } from "validators/validators"; import { USER_PROFILE_PANEL_ID } from 'store/user-profile/user-profile-actions'; import { noop } from 'lodash'; @@ -327,11 +326,8 @@ export const UserProfilePanelRoot = withStyles(styles)( paperProps={{ elevation: 0, }} - dataTableDefaultView={ - - } /> + defaultViewIcon={GroupsIcon} + defaultViewMessages={['Group list is empty.']} /> } ; } diff --git a/src/views/workflow-panel/workflow-panel-view.tsx b/src/views/workflow-panel/workflow-panel-view.tsx index ca84a0fc..44e14fd3 100644 --- a/src/views/workflow-panel/workflow-panel-view.tsx +++ b/src/views/workflow-panel/workflow-panel-view.tsx @@ -5,7 +5,6 @@ import React from 'react'; import { DataExplorer } from "views-components/data-explorer/data-explorer"; import { WorkflowIcon } from 'components/icon/icon'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; import { WORKFLOW_PANEL_ID } from 'store/workflow-panel/workflow-panel-actions'; import { ResourceLastModifiedDate, @@ -131,7 +130,8 @@ export const WorkflowPanelView = (props: WorkflowPanelProps) => { onRowDoubleClick={props.handleRowDoubleClick} contextMenuColumn={false} onContextMenu={e => e} - dataTableDefaultView={} /> + defaultViewIcon={WorkflowIcon} + defaultViewMessages={['Workflow list is empty.']} /> -- 2.30.2