@@ -39,7 +39,16 @@ class WBCollectionListing extends Component { | |||||
<div>{ item.owner_uuid }</div> | <div>{ item.owner_uuid }</div> | ||||
</div>), | </div>), | ||||
item['file_count'], | item['file_count'], | ||||
filesize(item['file_size_total']) | |||||
filesize(item['file_size_total']), | |||||
(<div> | |||||
<a class="btn btn-outline-primary m-1" title="Properties" | |||||
href={ urlForObject(item, 'properties') }> | |||||
<i class="fas fa-list-ul"></i> | |||||
</a> | |||||
<button class="btn btn-outline-danger m-1" title="Delete"> | |||||
<i class="fas fa-trash"></i> | |||||
</button> | |||||
</div>) | |||||
]); | ]); | ||||
} | } | ||||
@@ -109,7 +118,7 @@ class WBCollectionListing extends Component { | |||||
render({ app, ownerUuid, activePage, getPageUrl }, { rows, numPages }) { | render({ app, ownerUuid, activePage, getPageUrl }, { rows, numPages }) { | ||||
return ( | return ( | ||||
<div> | <div> | ||||
<WBTable columns={ [ 'Name', 'Description', 'Owner', 'File Count', 'Total Size' ] } | |||||
<WBTable columns={ [ 'Name', 'Description', 'Owner', 'File Count', 'Total Size', 'Actions' ] } | |||||
rows={ rows } /> | rows={ rows } /> | ||||
<WBPagination numPages={ numPages } | <WBPagination numPages={ numPages } | ||||
@@ -11,7 +11,7 @@ class WBNameAndUuid extends Component { | |||||
if (!uuid) | if (!uuid) | ||||
return; | return; | ||||
if (uuid in lookup) { | |||||
if (lookup && (uuid in lookup)) { | |||||
this.setState({ 'item': lookup[uuid]}); | this.setState({ 'item': lookup[uuid]}); | ||||
return; | return; | ||||
} | } | ||||
@@ -1,6 +1,6 @@ | |||||
import arvadosTypeName from 'arvados-type-name'; | import arvadosTypeName from 'arvados-type-name'; | ||||
function urlForObject(item) { | |||||
function urlForObject(item, mode='primary') { | |||||
let objectType = arvadosTypeName(item.uuid.split('-')[1]); | let objectType = arvadosTypeName(item.uuid.split('-')[1]); | ||||
if (objectType === 'user') | if (objectType === 'user') | ||||
return ('/browse/' + item.uuid); | return ('/browse/' + item.uuid); | ||||
@@ -10,9 +10,12 @@ function urlForObject(item) { | |||||
return ('/process/' + item.uuid); | return ('/process/' + item.uuid); | ||||
else if (objectType === 'workflow') | else if (objectType === 'workflow') | ||||
return ('https://wb.arkau.roche.com/workflows/' + item.uuid); | return ('https://wb.arkau.roche.com/workflows/' + item.uuid); | ||||
else if (objectType === 'collection') | |||||
return ('/collection/' + item.uuid); | |||||
else if (objectType === 'container') | |||||
else if (objectType === 'collection') { | |||||
if (mode === 'primary' || mode === 'browse') | |||||
return ('/collection-browse/' + item.uuid); | |||||
else | |||||
return ('/collection/' + item.uuid); | |||||
} else if (objectType === 'container') | |||||
return ('https://wb.arkau.roche.com/containers/' + item.uuid); | return ('https://wb.arkau.roche.com/containers/' + item.uuid); | ||||
} | } | ||||