From 236dc12fcad0d48c46750204b274896c5a58d054 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Fri, 7 Feb 2020 12:40:39 +0100 Subject: [PATCH] Continuing work on workflow launcher --- .gitignore | 2 +- frontend/rollup.config.js | 2 +- .../src/js/component/wb-collection-listing.js | 8 ++ .../src/js/component/wb-project-listing.js | 13 +++- .../src/js/component/wb-workflow-listing.js | 4 +- .../src/js/deprecated/wb-browse-dialog.js | 35 +++++++++ frontend/src/js/dialog/wb-toolbox-dialog.js | 77 +++++++++++++++++++ frontend/src/js/misc/url-for-object.js | 9 ++- frontend/src/js/page/wb-app.js | 8 ++ frontend/src/js/page/wb-browse.js | 3 +- .../src/js/page/wb-launch-workflow-page.js | 12 ++- 11 files changed, 163 insertions(+), 10 deletions(-) create mode 100644 frontend/src/js/deprecated/wb-browse-dialog.js create mode 100644 frontend/src/js/dialog/wb-toolbox-dialog.js diff --git a/.gitignore b/.gitignore index 3ca30a8..f8d63e5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ node_modules package-lock.json /frontend/dist/ /backend/server.pem - +/testdata/ diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js index 7032717..1b9adb6 100755 --- a/frontend/rollup.config.js +++ b/frontend/rollup.config.js @@ -16,7 +16,7 @@ export default { }, plugins: [ includePaths({ - paths: ['src/js', 'src/js/widget', 'src/js/misc', 'src/js/component', 'src/js/page'] + paths: ['src/js', 'src/js/widget', 'src/js/misc', 'src/js/component', 'src/js/page', 'src/js/dialog'] }), copy({ 'src/html/index.html': 'dist/index.html', diff --git a/frontend/src/js/component/wb-collection-listing.js b/frontend/src/js/component/wb-collection-listing.js index 0eeb5e6..9523399 100644 --- a/frontend/src/js/component/wb-collection-listing.js +++ b/frontend/src/js/component/wb-collection-listing.js @@ -21,6 +21,8 @@ class WBCollectionListing extends Component { } prepareRows(items, ownerLookup) { + let { app } = this.props; + return items.map(item => [ (
@@ -42,10 +44,16 @@ class WBCollectionListing extends Component { item['file_count'], filesize(item['file_size_total']), (
+ + + diff --git a/frontend/src/js/component/wb-project-listing.js b/frontend/src/js/component/wb-project-listing.js index cb107d1..9d37885 100644 --- a/frontend/src/js/component/wb-project-listing.js +++ b/frontend/src/js/component/wb-project-listing.js @@ -17,6 +17,8 @@ class WBProjectListing extends Component { } prepareRows(items) { + let { app } = this.props; + return items.map(item => [ (
@@ -26,7 +28,13 @@ class WBProjectListing extends Component {
{ item['uuid'] }
), item['description'], - item['owner_uuid'] + item['owner_uuid'], + (
+ +
) ]); } @@ -57,8 +65,9 @@ class WBProjectListing extends Component { render({ arvHost, arvToken, ownerUuid, activePage, onPageChanged }, { rows, numPages }) { return (
- + onPageChanged(i) } /> diff --git a/frontend/src/js/component/wb-workflow-listing.js b/frontend/src/js/component/wb-workflow-listing.js index 6329cd1..f7bb05b 100644 --- a/frontend/src/js/component/wb-workflow-listing.js +++ b/frontend/src/js/component/wb-workflow-listing.js @@ -5,6 +5,7 @@ import WBPagination from 'wb-pagination'; import WBNameAndUuid from 'wb-name-and-uuid'; import wbFetchObjects from 'wb-fetch-objects'; import wbFormatDate from 'wb-format-date'; +import urlForObject from 'url-for-object'; class WBWorkflowListing extends Component { @@ -25,7 +26,8 @@ class WBWorkflowListing extends Component { ( ), wbFormatDate(item.created_at), (
- +
) diff --git a/frontend/src/js/deprecated/wb-browse-dialog.js b/frontend/src/js/deprecated/wb-browse-dialog.js new file mode 100644 index 0000000..7e97ce6 --- /dev/null +++ b/frontend/src/js/deprecated/wb-browse-dialog.js @@ -0,0 +1,35 @@ +import { h, Component } from 'preact'; + +class WBBrowseDialog extends Component { + constructor(...args) { + super(...args); + } + + render({ id }) { + return ( +