X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ae691a976c8e505afba7cec6f8f316d1c5b175a7..7afc443a21879751d8afd8ec36a3ae993d98b85a:/src/views-components/details-panel/collection-details.tsx

diff --git a/src/views-components/details-panel/collection-details.tsx b/src/views-components/details-panel/collection-details.tsx
index 28817766..98fa3886 100644
--- a/src/views-components/details-panel/collection-details.tsx
+++ b/src/views-components/details-panel/collection-details.tsx
@@ -3,13 +3,13 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { CollectionIcon } from '../../components/icon/icon';
-import { CollectionResource } from '../../models/collection';
-import { formatDate } from '../../common/formatters';
-import { resourceLabel } from '../../common/labels';
-import { ResourceKind } from '../../models/resource';
+import { CollectionIcon } from '~/components/icon/icon';
+import { CollectionResource } from '~/models/collection';
+import { formatDate, formatFileSize } from '~/common/formatters';
+import { resourceLabel } from '~/common/labels';
+import { ResourceKind } from '~/models/resource';
 import { DetailsData } from "./details-data";
-import { DetailsAttribute } from "../../components/details-attribute/details-attribute";
+import { DetailsAttribute } from "~/components/details-attribute/details-attribute";
 
 export class CollectionDetails extends DetailsData<CollectionResource> {
 
@@ -19,17 +19,17 @@ export class CollectionDetails extends DetailsData<CollectionResource> {
 
     getDetails() {
         return <div>
-            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.Collection)} />
+            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.COLLECTION)} />
             <DetailsAttribute label='Size' value='---' />
-            <DetailsAttribute label='Owner' value={this.item.ownerUuid} />
+            <DetailsAttribute label='Owner' value={this.item.ownerUuid} lowercaseValue={true} />
             <DetailsAttribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
             <DetailsAttribute label='Created at' value={formatDate(this.item.createdAt)} />
             {/* Links but we dont have view */}
             <DetailsAttribute label='Collection UUID' link={this.item.uuid} value={this.item.uuid} />
             <DetailsAttribute label='Content address' link={this.item.portableDataHash} value={this.item.portableDataHash} />
             {/* Missing attrs */}
-            <DetailsAttribute label='Number of files' value='20' />
-            <DetailsAttribute label='Content size' value='54 MB' />
+            <DetailsAttribute label='Number of files' value={this.data && this.data.fileCount} />
+            <DetailsAttribute label='Content size' value={formatFileSize(this.data && this.data.fileSize)} />
         </div>;
     }
 }
