X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8d374520f28b507e8934d57be46374044fb93e2f..c59724a9e5d4c9241df58d9d60541a63f0f06b80:/src/views/user-profile-panel/user-profile-panel-root.tsx 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..4a208371 100644 --- a/src/views/user-profile-panel/user-profile-panel-root.tsx +++ b/src/views/user-profile-panel/user-profile-panel-root.tsx @@ -24,19 +24,19 @@ 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'; -import { DetailsIcon, GroupsIcon, MoreOptionsIcon } from 'components/icon/icon'; +import { DetailsIcon, GroupsIcon, MoreVerticalIcon } from 'components/icon/icon'; import { DataColumns } from 'components/data-table/data-table'; import { ResourceLinkHeadUuid, ResourceLinkHeadPermissionLevel, ResourceLinkHead, ResourceLinkDelete, ResourceLinkTailIsVisible, UserResourceAccountStatus } from 'views-components/data-explorer/renderers'; import { createTree } from 'models/tree'; import { getResource, ResourcesState } from 'store/resources/resources'; import { DefaultView } from 'components/default-view/default-view'; import { CopyToClipboardSnackbar } from 'components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar'; +import { PermissionResource } from 'models/permission'; -type CssRules = 'root' | 'emptyRoot' | 'gridItem' | 'label' | 'readOnlyValue' | 'title' | 'description' | 'actions' | 'content' | 'copyIcon'; +type CssRules = 'root' | 'emptyRoot' | 'gridItem' | 'label' | 'readOnlyValue' | 'title' | 'description' | 'actions' | 'content' | 'copyIcon' | 'userProfileFormMessage'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { @@ -81,6 +81,9 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ '& svg': { fontSize: '1rem' } + }, + userProfileFormMessage: { + fontSize: '1.1rem', } }); @@ -97,6 +100,7 @@ export interface UserProfilePanelRootDataProps { userUuid: string; resources: ResourcesState; localCluster: string; + userProfileFormMessage: string; } const RoleTypes = [ @@ -126,7 +130,7 @@ enum TABS { } -export const userProfileGroupsColumns: DataColumns = [ +export const userProfileGroupsColumns: DataColumns = [ { name: UserProfileGroupsColumnNames.NAME, selected: true, @@ -165,7 +169,7 @@ export const userProfileGroupsColumns: DataColumns = [ ]; const ReadOnlyField = withStyles(styles)( - (props: ({ label: string, input: {value: string} }) & WithStyles ) => ( + (props: ({ label: string, input: { value: string } }) & WithStyles) => ( {props.label} @@ -184,7 +188,7 @@ export const UserProfilePanelRoot = withStyles(styles)( }; componentDidMount() { - this.setState({ value: TABS.PROFILE}); + this.setState({ value: TABS.PROFILE }); } render() { @@ -213,14 +217,14 @@ export const UserProfilePanelRoot = withStyles(styles)( - + this.handleContextMenu(event, this.props.userUuid)}> - + @@ -261,6 +265,9 @@ export const UserProfilePanelRoot = withStyles(styles)( disabled /> + + {this.props.userProfileFormMessage} + - } /> + id={USER_PROFILE_PANEL_ID} + data-cy="user-profile-groups-data-explorer" + onRowClick={noop} + onRowDoubleClick={noop} + onContextMenu={noop} + contextMenuColumn={false} + hideColumnSelector + hideSearchInput + paperProps={{ + elevation: 0, + }} + defaultViewIcon={GroupsIcon} + defaultViewMessages={['Group list is empty.']} /> } ; }