X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8d374520f28b507e8934d57be46374044fb93e2f..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 e854da0e..245a6597 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -3,10 +3,19 @@
// SPDX-License-Identifier: AGPL-3.0
import React from 'react';
-import { Grid, Typography, withStyles, Tooltip, IconButton, Checkbox } from '@material-ui/core';
+import {
+ Grid,
+ Typography,
+ withStyles,
+ Tooltip,
+ IconButton,
+ Checkbox,
+ Chip
+} from '@material-ui/core';
import { FavoriteStar, PublicFavoriteStar } from '../favorite-star/favorite-star';
import { Resource, ResourceKind, TrashableResource } from 'models/resource';
import {
+ LockIcon,
ProjectIcon,
FilterGroupIcon,
CollectionIcon,
@@ -51,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) => {
@@ -71,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);
@@ -726,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 === '') {
@@ -825,14 +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
- {status}
- ;
- });
+ ((props: { process?: Process, theme: ArvadosTheme }) =>
+ props.process
+ ?
+ : -
+ );
export const ProcessStartDate = connect(
(state: RootState, props: { uuid: string }) => {