diff --git a/frontend/src/js/component/wb-process-listing.js b/frontend/src/js/component/wb-process-listing.js index 68e3af7..02daf13 100644 --- a/frontend/src/js/component/wb-process-listing.js +++ b/frontend/src/js/component/wb-process-listing.js @@ -26,30 +26,43 @@ class WBProcessListing extends Component { prepareRows(requests, containerLookup, ownerLookup, outputLookup) { const { renderRenameLink, renderDeleteButton } = this.props; - return requests.map(item => [ - (
-
- - { item['name'] } - { renderRenameLink(item, () => this.fetchItems()) } -
-
{ item['uuid'] }
-
), - (
-
{ item['state'] } /
-
{ item.container_uuid ? - item.container_uuid in containerLookup ? - containerLookup[item.container_uuid].state : - "Container Not Found" : - { String(item.container_uuid) } }
-
), - ( ), - wbFormatDate(item['created_at']), - ( ), - (
- { renderDeleteButton(item, () => this.fetchItems()) } -
) - ]); + 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 ( [ + (
+
+ + { item['name'] } + { renderRenameLink(item, () => this.fetchItems()) } +
+
{ item['uuid'] }
+
), + (
+ { item['state'] } / + { item.container_uuid ? + container ? + container.state : + "Container Not Found" : + { String(item.container_uuid) } } + { !(error || warning) && container && container.state === 'Complete' ? " / Success" : null } + { error ? [" / ", E ] : null } + { warning ? [ " / ", W ] : null } +
), + ( ), + wbFormatDate(item['created_at']), + ( ), + (
+ { renderDeleteButton(item, () => this.fetchItems()) } +
) + ] ); + }); } 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)