1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { CollectionIcon } from '~/components/icon/icon';
7 import { CollectionResource } from '~/models/collection';
8 import { formatDate } from '~/common/formatters';
9 import { resourceLabel } from '~/common/labels';
10 import { ResourceKind } from '~/models/resource';
11 import { DetailsData } from "./details-data";
12 import { DetailsAttribute } from "~/components/details-attribute/details-attribute";
14 export class CollectionDetails extends DetailsData<CollectionResource> {
16 getIcon(className?: string) {
17 return <CollectionIcon className={className} />;
22 <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.COLLECTION)} />
23 <DetailsAttribute label='Size' value='---' />
24 <DetailsAttribute label='Owner' value={this.item.ownerUuid} lowercaseValue={true} />
25 <DetailsAttribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
26 <DetailsAttribute label='Created at' value={formatDate(this.item.createdAt)} />
27 {/* Links but we dont have view */}
28 <DetailsAttribute label='Collection UUID' link={this.item.uuid} value={this.item.uuid} />
29 <DetailsAttribute label='Content address' link={this.item.portableDataHash} value={this.item.portableDataHash} />
31 <DetailsAttribute label='Number of files' value='20' />
32 <DetailsAttribute label='Content size' value='54 MB' />