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!
Browse Source

Fix WBProcessState - mark processes as Failed when exit_code is not 0, as Cancelled when priority is 0.

pull/1/head
parent
commit
f6044afd07
2 changed files with 7 additions and 5 deletions
  1. +4
    -4
      frontend/src/js/component/wb-process-state.js
  2. +3
    -1
      frontend/src/js/misc/wb-process-state-name.js

+ 4
- 4
frontend/src/js/component/wb-process-state.js View File

@@ -1,5 +1,6 @@
import { h, Component } from 'preact';
import makeArvadosRequest from 'make-arvados-request';
import wbProcessStateName from 'wb-process-state-name';
class WBProcessState extends Component {
componentDidMount() {
@@ -37,14 +38,13 @@ class WBProcessState extends Component {
return (
<div>
{ process.state }
{ wbProcessStateName(process, container) }
{ apiError ? <i>{ [ ' / ', apiError ] }</i> : null }
{ container ? [ " / ", container.state ] : null }
{ !(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 } { lazy && !container && !apiError ? (
title={ warning }>W</a> ] : null } {}
{ lazy && !container && !apiError ? (
<a href="#" title="Look up" onclick={ e => { e.preventDefault(); this.fetchData(); } }>
<i class="fas fa-search"></i>
</a>


+ 3
- 1
frontend/src/js/misc/wb-process-state-name.js View File

@@ -1,9 +1,11 @@
function wbProcessStateName(containerRequest, container) {
const cr = containerRequest;
const c = container;
if (!c)
return cr.state;
if (cr.state !== 'Uncommitted' && cr.priority === 0)
return 'Cancelled';
if (cr.state === 'Uncommitted' || !c || c.state === 'Queued' || c.state === 'Locked')
if (cr.state === 'Uncommitted' || !cr.container_uuid || c.state === 'Queued' || c.state === 'Locked')
return 'Pending';
if (c.state === 'Running')
return 'Running';


Loading…
Cancel
Save