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!
Преглед на файлове

Make WBBrowse more concise by using common properties.

master
Stanislaw Adaszewski преди 4 години
родител
ревизия
e3d98fd2f8
променени са 2 файла, в които са добавени 21 реда и са изтрити 32 реда
  1. +1
    -1
      frontend/rollup.config.js
  2. +20
    -31
      frontend/src/js/page/wb-browse.js

+ 1
- 1
frontend/rollup.config.js Целия файл

@@ -55,7 +55,7 @@ export default {
'node_modules/papaya-viewer/release/current/standard/papaya.css': 'dist/css/papaya.css',
verbose: true
}),
buble({jsx: 'h'}),
buble({jsx: 'h', objectAssign: 'Object.assign'}),
resolve({}),
license({
banner: 'Copyright (C) F. Hoffmann-La Roche AG, 2020.\nAuthor: stanislaw.adaszewski@roche.com\nAll Rights Reserved.',


+ 20
- 31
frontend/src/js/page/wb-browse.js Целия файл

@@ -146,6 +146,19 @@ class WBBrowse extends Component {
objTypeTab, collectionPage, processPage, workflowPage,
textSearch }, { selected }) {
const commonProps = {
renderRenameLink: (it, cb) => this.renderRenameLink(it, cb),
renderDeleteButton: (it, cb) => this.renderDeleteButton(it, cb),
renderSelectionCell: it => this.renderSelectionCell(it),
renderSharingButton: it => this.renderSharingButton(it),
textSearch,
app,
appState: app.state,
arvHost: app.state.arvHost,
arvToken: app.state.arvToken,
ownerUuid
};
return (
<div>
<WBRenameDialog app={ app } ref={ this.renameDialogRef } />
@@ -170,19 +183,11 @@ class WBBrowse extends Component {
copyHere={ () => this.copyHere() } />
<WBProjectListing ref={ this.projectListingRef }
app={ app }
arvHost={ app.state.arvHost }
arvToken={ app.state.arvToken }
mode={ mode }
ownerUuid={ ownerUuid }
itemsPerPage="5"
activePage={ Number(activePage || 0) }
getPageUrl={ i => this.getUrl({ 'activePage': i }) }
renderRenameLink={ (it, cb) => this.renderRenameLink(it, cb) }
renderDeleteButton={ (it, cb) => this.renderDeleteButton(it, cb) }
renderSelectionCell={ it => this.renderSelectionCell(it) }
renderSharingButton={ it => this.renderSharingButton(it) }
textSearch={ textSearch } />
{ ...commonProps } />
{ (mode !== 'browse') ? null : (
<WBTabs tabs={ [
@@ -195,41 +200,25 @@ class WBBrowse extends Component {
{
(mode !== 'browse') ? null :
(!objTypeTab || objTypeTab === 'collection') ? (
<WBCollectionListing app={ app }
ownerUuid={ ownerUuid }
<WBCollectionListing
itemsPerPage="20"
activePage={ Number(collectionPage || 0) }
getPageUrl={ i => this.getUrl({ 'collectionPage': i }) }
renderRenameLink={ (it, cb) => this.renderRenameLink(it, cb) }
renderDeleteButton={ (it, cb) => this.renderDeleteButton(it, cb) }
renderSelectionCell={ it => this.renderSelectionCell(it) }
renderSharingButton={ it => this.renderSharingButton(it) }
textSearch={ textSearch } />
{ ...commonProps } />
) : (objTypeTab === 'process') ? (
<WBProcessListing app={ app }
appState={ app.state }
ownerUuid={ ownerUuid }
<WBProcessListing
itemsPerPage="20"
activePage={ Number(processPage || 0) }
onPageChanged={ i => this.route({ 'processPage': i }) }
renderRenameLink={ (it, cb) => this.renderRenameLink(it, cb) }
renderDeleteButton={ (it, cb) => this.renderDeleteButton(it, cb) }
renderSelectionCell={ it => this.renderSelectionCell(it) }
renderSharingButton={ it => this.renderSharingButton(it) }
textSearch={ textSearch } />
{ ...commonProps } />
) : (objTypeTab === 'workflow') ? (
<WBWorkflowListing app={ app }
ownerUuid={ ownerUuid }
<WBWorkflowListing
itemsPerPage="20"
page={ Number(workflowPage || 0) }
getPageUrl={ i => this.getUrl({ 'workflowPage': i }) }
renderRenameLink={ (it, cb) => this.renderRenameLink(it, cb) }
renderDeleteButton={ (it, cb) => this.renderDeleteButton(it, cb) }
renderSelectionCell={ it => this.renderSelectionCell(it) }
renderSharingButton={ it => this.renderSharingButton(it) }
textSearch={ textSearch } />
{ ...commonProps } />
) : null
}


Loading…
Отказ
Запис