IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Procházet zdrojové kódy

Changed default collection url to content browser, added properties as optional action in the listing.

master
Stanislaw Adaszewski před 4 roky
rodič
revize
dc1c6c282f
3 změnil soubory, kde provedl 19 přidání a 7 odebrání
  1. +11
    -2
      frontend/src/js/component/wb-collection-listing.js
  2. +1
    -1
      frontend/src/js/component/wb-name-and-uuid.js
  3. +7
    -4
      frontend/src/js/misc/url-for-object.js

+ 11
- 2
frontend/src/js/component/wb-collection-listing.js Zobrazit soubor

@@ -39,7 +39,16 @@ class WBCollectionListing extends Component {
<div>{ item.owner_uuid }</div>
</div>),
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 }) {
return (
<div>
<WBTable columns={ [ 'Name', 'Description', 'Owner', 'File Count', 'Total Size' ] }
<WBTable columns={ [ 'Name', 'Description', 'Owner', 'File Count', 'Total Size', 'Actions' ] }
rows={ rows } />
<WBPagination numPages={ numPages }


+ 1
- 1
frontend/src/js/component/wb-name-and-uuid.js Zobrazit soubor

@@ -11,7 +11,7 @@ class WBNameAndUuid extends Component {
if (!uuid)
return;
if (uuid in lookup) {
if (lookup && (uuid in lookup)) {
this.setState({ 'item': lookup[uuid]});
return;
}


+ 7
- 4
frontend/src/js/misc/url-for-object.js Zobrazit soubor

@@ -1,6 +1,6 @@
import arvadosTypeName from 'arvados-type-name';
function urlForObject(item) {
function urlForObject(item, mode='primary') {
let objectType = arvadosTypeName(item.uuid.split('-')[1]);
if (objectType === 'user')
return ('/browse/' + item.uuid);
@@ -10,9 +10,12 @@ function urlForObject(item) {
return ('/process/' + item.uuid);
else if (objectType === 'workflow')
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);
}


Načítá se…
Zrušit
Uložit