X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/18425d0dfa8a652fef8377a6fb09018f55d2beec..f1158a80eae96784f909ad496487f5604fe95329:/src/views-components/data-explorer/renderers.tsx diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx index fe1bd07c..245a6597 100644 --- a/src/views-components/data-explorer/renderers.tsx +++ b/src/views-components/data-explorer/renderers.tsx @@ -15,6 +15,7 @@ import { import { FavoriteStar, PublicFavoriteStar } from '../favorite-star/favorite-star'; import { Resource, ResourceKind, TrashableResource } from 'models/resource'; import { + LockIcon, ProjectIcon, FilterGroupIcon, CollectionIcon, @@ -59,6 +60,7 @@ import { openPermissionEditContextMenu } from 'store/context-menu/context-menu-a import { getUserUuid } from 'common/getuser'; import { VirtualMachinesResource } from 'models/virtual-machines'; import { CopyToClipboardSnackbar } from 'components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar'; +import { ProjectResource } from 'models/project'; const renderName = (dispatch: Dispatch, item: GroupContentsResource) => { @@ -79,11 +81,32 @@ const renderName = (dispatch: Dispatch, item: GroupContentsResource) => { + { + item.kind === ResourceKind.PROJECT && + } ; }; +const FrozenProject = (props: {item: ProjectResource}) => { + const [fullUsername, setFullusername] = React.useState(null); + const getFullName = React.useCallback(() => { + if (props.item.frozenByUuid) { + setFullusername(); + } + }, [props.item, setFullusername]) + + if (props.item.frozenByUuid) { + + return Project was frozen by {fullUsername}}> + + ; + } else { + return null; + } +} + export const ResourceName = connect( (state: RootState, props: { uuid: string }) => { const resource = getResource(props.uuid)(state.resources); @@ -734,7 +757,7 @@ export const ResourceOwnerWithName = export const UserNameFromID = compose(userFromID)( - (props: { uuid: string, userFullname: string, dispatch: Dispatch }) => { + (props: { uuid: string, displayAsText?: string, userFullname: string, dispatch: Dispatch }) => { const { uuid, userFullname, dispatch } = props; if (userFullname === '') { @@ -833,19 +856,21 @@ export const ProcessStatus = compose( return { process: getProcess(props.uuid)(state.resources) }; }), withStyles({}, { withTheme: true })) - ((props: { process?: Process, theme: ArvadosTheme }) => { - const status = props.process ? getProcessStatus(props.process) : "-"; - return + props.process + ? ; - }); + /> + : - + ); export const ProcessStartDate = connect( (state: RootState, props: { uuid: string }) => {