Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>
import { ResourceStatus as WorkflowStatus } from '~/views/workflow-panel/workflow-panel-view';
import { getUuidPrefix, openRunProcess } from '~/store/workflow-panel/workflow-panel-actions';
import { openSharingDialog } from '~/store/sharing-dialog/sharing-dialog-actions';
import { ResourceStatus as WorkflowStatus } from '~/views/workflow-panel/workflow-panel-view';
import { getUuidPrefix, openRunProcess } from '~/store/workflow-panel/workflow-panel-actions';
import { openSharingDialog } from '~/store/sharing-dialog/sharing-dialog-actions';
-import { UserResource } from '~/models/user';
+import { getUserFullname, User, UserResource } from '~/models/user';
import { toggleIsActive, toggleIsAdmin } from '~/store/users/users-actions';
import { LinkResource } from '~/models/link';
import { navigateTo } from '~/store/navigation/navigation-action';
import { toggleIsActive, toggleIsAdmin } from '~/store/users/users-actions';
import { LinkResource } from '~/models/link';
import { navigateTo } from '~/store/navigation/navigation-action';
connect(
(state: RootState, props: { uuid: string }) => {
let ownerName = '';
connect(
(state: RootState, props: { uuid: string }) => {
let ownerName = '';
- const resource = getResource<GroupContentsResource>(props.uuid)(state.resources);
+ const resource = getResource<GroupContentsResource & UserResource>(props.uuid)(state.resources);
- ownerName = (resource as any).fullName || resource.name;
+ ownerName = getUserFullname(resource as User) || (resource as GroupContentsResource).name;
}
return { uuid: props.uuid, ownerName };
}
return { uuid: props.uuid, ownerName };
}
return <Typography style={{ color: theme.palette.primary.main }} inline noWrap>
}
return <Typography style={{ color: theme.palette.primary.main }} inline noWrap>
({ classes, project, onClick }: ProjectDetailsComponentProps) => <div>
<DetailsAttribute label='Type' value={resourceLabel(ResourceKind.PROJECT)} />
<DetailsAttribute label='Owner' linkToUuid={project.ownerUuid}
({ classes, project, onClick }: ProjectDetailsComponentProps) => <div>
<DetailsAttribute label='Type' value={resourceLabel(ResourceKind.PROJECT)} />
<DetailsAttribute label='Owner' linkToUuid={project.ownerUuid}
- uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} lowercaseValue={true} />
+ uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
<DetailsAttribute label='Last modified' value={formatDate(project.modifiedAt)} />
<DetailsAttribute label='Created at' value={formatDate(project.createdAt)} />
<DetailsAttribute label='Project UUID' linkToUuid={project.uuid} value={project.uuid} />
<DetailsAttribute label='Last modified' value={formatDate(project.modifiedAt)} />
<DetailsAttribute label='Created at' value={formatDate(project.createdAt)} />
<DetailsAttribute label='Project UUID' linkToUuid={project.uuid} value={project.uuid} />
<Grid item xs={12} md={mdSize}>
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
label={isOldVersion ? "This version's UUID" : "Collection UUID"}
<Grid item xs={12} md={mdSize}>
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
label={isOldVersion ? "This version's UUID" : "Collection UUID"}
- linkToUuid={`${item.uuid} AAAAAAAAAAAAAAAPortable data hash`} />
+ linkToUuid={item.uuid} />
</Grid>
<Grid item xs={12} md={mdSize}>
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
</Grid>
<Grid item xs={12} md={mdSize}>
<DetailsAttribute classLabel={classes.label} classValue={classes.value}