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!
Просмотр исходного кода

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

pull/1/head
Stanislaw Adaszewski 4 лет назад
Родитель
Сommit
dc1c6c282f
3 измененных файлов: 19 добавлений и 7 удалений
  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 Просмотреть файл

@@ -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 Просмотреть файл

@@ -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 Просмотреть файл

@@ -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);
}


Загрузка…
Отмена
Сохранить