|
|
@@ -44,6 +44,9 @@ class WBNameAndUuid extends Component { |
|
|
|
prom = prom.then(xhr => this.setState({
|
|
|
|
'item': xhr.response
|
|
|
|
}));
|
|
|
|
prom = prom.catch(xhr => this.setState({
|
|
|
|
'error': 'Unable to retrieve: ' + xhr.status + ' (' + xhr.statusText + ')'
|
|
|
|
}));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.setState({
|
|
|
@@ -54,7 +57,7 @@ class WBNameAndUuid extends Component { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
render({ uuid }, { item }) {
|
|
|
|
render({ uuid }, { error, item }) {
|
|
|
|
if (!uuid)
|
|
|
|
return (
|
|
|
|
<div><i>{ String(uuid) }</i></div>
|
|
|
@@ -63,9 +66,9 @@ class WBNameAndUuid extends Component { |
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{ item ? (
|
|
|
|
{ error ? error : (item ? (
|
|
|
|
<a href={ urlForObject(item) }>{ arvadosObjectName(item) }</a>
|
|
|
|
) : 'Loading...' }
|
|
|
|
) : 'Loading...') }
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{ uuid }
|
|
|
|