|
@@ -58,6 +58,12 @@ function uuidsToCwl(obj, isFile) { |
|
|
throw Error('Expected Arvados path or array of paths');
|
|
|
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 {
|
|
|
class WBPathDisplay extends Component {
|
|
|
fetchData() {
|
|
|
fetchData() {
|
|
|
const { app, path } = this.props;
|
|
|
const { app, path } = this.props;
|
|
@@ -72,6 +78,7 @@ class WBPathDisplay extends Component { |
|
|
item: xhr.response,
|
|
|
item: xhr.response,
|
|
|
tail: path.substr(m[0].length)
|
|
|
tail: path.substr(m[0].length)
|
|
|
}));
|
|
|
}));
|
|
|
|
|
|
prom = prom.catch(() => this.setState({ 'error': 'Cannot load' }));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
componentDidMount() {
|
|
@@ -83,7 +90,10 @@ class WBPathDisplay extends Component { |
|
|
this.fetchData();
|
|
|
this.fetchData();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
render({}, { item, tail }) {
|
|
|
|
|
|
|
|
|
render({}, { item, tail, error }) {
|
|
|
|
|
|
if (error)
|
|
|
|
|
|
return error;
|
|
|
|
|
|
|
|
|
if (!item)
|
|
|
if (!item)
|
|
|
return 'Loading...';
|
|
|
return 'Loading...';
|
|
|
|
|
|
|
|
@@ -180,12 +190,12 @@ class WBLaunchWorkflowPage extends Component { |
|
|
<ul class="mb-0">
|
|
|
<ul class="mb-0">
|
|
|
{ value.map(path => (
|
|
|
{ value.map(path => (
|
|
|
<li>
|
|
|
<li>
|
|
|
<WBPathDisplay app={ app } path={ path } />
|
|
|
|
|
|
|
|
|
<WBPathDisplay app={ app } path={ parseKeepRef(path) } />
|
|
|
</li>
|
|
|
</li>
|
|
|
)) }
|
|
|
)) }
|
|
|
</ul>
|
|
|
</ul>
|
|
|
) : (
|
|
|
) : (
|
|
|
<WBPathDisplay app={ app } path={ value } />
|
|
|
|
|
|
|
|
|
<WBPathDisplay app={ app } path={ parseKeepRef(value) } />
|
|
|
) : null }
|
|
|
) : null }
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|
|
|
);
|
|
|