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!
Sfoglia il codice sorgente

Added error/warning display in WBProcessListing.

pull/1/head
parent
commit
867b58ef7b
1 ha cambiato i file con 39 aggiunte e 25 eliminazioni
  1. +39
    -25
      frontend/src/js/component/wb-process-listing.js

+ 39
- 25
frontend/src/js/component/wb-process-listing.js Vedi File

@@ -26,30 +26,43 @@ class WBProcessListing extends Component {
prepareRows(requests, containerLookup, ownerLookup, outputLookup) {
const { renderRenameLink, renderDeleteButton } = this.props;
return requests.map(item => [
(<div>
<div>
<a href={ '/process/' + item['uuid'] }>
{ item['name'] }
</a> { renderRenameLink(item, () => this.fetchItems()) }
</div>
<div>{ item['uuid'] }</div>
</div>),
( <div>
<div>{ item['state'] } /</div>
<div>{ item.container_uuid ?
item.container_uuid in containerLookup ?
containerLookup[item.container_uuid].state :
"Container Not Found" :
<i>{ String(item.container_uuid) }</i> }</div>
</div> ),
( <WBNameAndUuid uuid={ item['owner_uuid'] } lookup={ ownerLookup } /> ),
wbFormatDate(item['created_at']),
( <WBNameAndUuid uuid={ item['output_uuid'] } lookup={ outputLookup } /> ),
(<div>
{ renderDeleteButton(item, () => this.fetchItems()) }
</div>)
]);
return requests.map(item => {
const container = item.container_uuid in containerLookup ?
containerLookup[item.container_uuid] : null;
const runtimeStatus = container ? container.runtime_status : null;
const error = runtimeStatus ? runtimeStatus.error : null;
const warning = runtimeStatus ? runtimeStatus.warning : null;
return ( [
(<div>
<div>
<a href={ '/process/' + item['uuid'] }>
{ item['name'] }
</a> { renderRenameLink(item, () => this.fetchItems()) }
</div>
<div>{ item['uuid'] }</div>
</div>),
( <div>
{ item['state'] } /
{ item.container_uuid ?
container ?
container.state :
"Container Not Found" :
<i>{ String(item.container_uuid) }</i> }
{ !(error || warning) && container && container.state === 'Complete' ? " / Success" : null }
{ error ? [" / ", <a href={ '/container/' + container.uuid }
title={ error }>E</a> ] : null }
{ warning ? [ " / ", <a href={ '/container/' + container.uuid }
title={ warning }>W</a> ] : null }
</div> ),
( <WBNameAndUuid uuid={ item['owner_uuid'] } lookup={ ownerLookup } /> ),
wbFormatDate(item['created_at']),
( <WBNameAndUuid uuid={ item['output_uuid'] } lookup={ outputLookup } /> ),
(<div>
{ renderDeleteButton(item, () => this.fetchItems()) }
</div>)
] );
});
}
fetchItems() {
@@ -59,9 +72,10 @@ class WBProcessListing extends Component {
requestingContainerUuid } = this.props;
const filters = [
[ 'state', 'in', requestStates.filter((_, idx) => reqStateMask[idx]) ],
[ 'requesting_container_uuid', '=', requestingContainerUuid ]
];
if (!reqStateMask.reduce((a, b) => a & b))
filters.push([ 'state', 'in', requestStates.filter((_, idx) => reqStateMask[idx]) ]);
if (ownerUuid)
filters.push([ 'owner_uuid', '=', ownerUuid ]);
//if (requestingContainerUuid)


Loading…
Annulla
Salva