From 9c1ed80b082d4cf01c6875b7ae84ef4e8bdd8547 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Thu, 12 Mar 2020 19:20:56 +0100 Subject: [PATCH] Default values in workflows seem to work. --- frontend/src/js/page/wb-launch-workflow-page.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/src/js/page/wb-launch-workflow-page.js b/frontend/src/js/page/wb-launch-workflow-page.js index 09dacc1..0878a65 100644 --- a/frontend/src/js/page/wb-launch-workflow-page.js +++ b/frontend/src/js/page/wb-launch-workflow-page.js @@ -58,6 +58,12 @@ function uuidsToCwl(obj, isFile) { throw Error('Expected Arvados path or array of paths'); } +function parseKeepRef(value) { + if (typeof(value) === 'object' && 'location' in value && value.location.startsWith('keep:')) + return value.location.substr(5); + return value; +} + class WBPathDisplay extends Component { fetchData() { const { app, path } = this.props; @@ -72,6 +78,7 @@ class WBPathDisplay extends Component { item: xhr.response, tail: path.substr(m[0].length) })); + prom = prom.catch(() => this.setState({ 'error': 'Cannot load' })); } componentDidMount() { @@ -83,7 +90,10 @@ class WBPathDisplay extends Component { this.fetchData(); } - render({}, { item, tail }) { + render({}, { item, tail, error }) { + if (error) + return error; + if (!item) return 'Loading...'; @@ -180,12 +190,12 @@ class WBLaunchWorkflowPage extends Component { ) : ( - + ) : null } );