@@ -8,6 +8,7 @@ import wbFormatDate from 'wb-format-date'; | |||||
import WBNameAndUuid from 'wb-name-and-uuid'; | import WBNameAndUuid from 'wb-name-and-uuid'; | ||||
import WBAccordion from 'wb-accordion'; | import WBAccordion from 'wb-accordion'; | ||||
import wbFormatSpecialValue from 'wb-format-special-value'; | import wbFormatSpecialValue from 'wb-format-special-value'; | ||||
import WBJsonViewer from 'wb-json-viewer'; | |||||
class WBCollectionFields extends Component { | class WBCollectionFields extends Component { | ||||
componentDidMount() { | componentDidMount() { | ||||
@@ -39,7 +40,7 @@ class WBCollectionFields extends Component { | |||||
[ 'Description', wbFormatSpecialValue(item.description) ], | [ 'Description', wbFormatSpecialValue(item.description) ], | ||||
[ 'Properties', ( | [ 'Properties', ( | ||||
<WBAccordion names={ ['Properties'] } cardHeaderClass="card-header-sm"> | <WBAccordion names={ ['Properties'] } cardHeaderClass="card-header-sm"> | ||||
<pre class="word-wrap">{ JSON.stringify(item.properties, null, 2) }</pre> | |||||
<WBJsonViewer value={ item.properties } /> | |||||
</WBAccordion> | </WBAccordion> | ||||
) ], | ) ], | ||||
[ 'Portable Data Hash', item.portable_data_hash ], | [ 'Portable Data Hash', item.portable_data_hash ], | ||||
@@ -7,6 +7,7 @@ import urlForObject from 'url-for-object'; | |||||
import wbFormatDate from 'wb-format-date'; | import wbFormatDate from 'wb-format-date'; | ||||
import WBNameAndUuid from 'wb-name-and-uuid'; | import WBNameAndUuid from 'wb-name-and-uuid'; | ||||
import WBAccordion from 'wb-accordion'; | import WBAccordion from 'wb-accordion'; | ||||
import WBJsonViewer from 'wb-json-viewer'; | |||||
class WBContainerFields extends Component { | class WBContainerFields extends Component { | ||||
componentDidMount() { | componentDidMount() { | ||||
@@ -38,38 +39,38 @@ class WBContainerFields extends Component { | |||||
[ 'Environment', ( | [ 'Environment', ( | ||||
<WBAccordion names={ ['Environment'] } | <WBAccordion names={ ['Environment'] } | ||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
<pre class="word-wrap">{ JSON.stringify(item.environment, null, 2) }</pre> | |||||
<WBJsonViewer value={ item.environment } /> | |||||
</WBAccordion> | </WBAccordion> | ||||
) ], | ) ], | ||||
[ 'Working Directory', item.cwd ], | [ 'Working Directory', item.cwd ], | ||||
[ 'Command', ( | [ 'Command', ( | ||||
<pre class="word-wrap">{ JSON.stringify(item.command) }</pre> | |||||
<WBJsonViewer value={ item.command } /> | |||||
) ], | ) ], | ||||
[ 'Output Path', item.output_path ], | [ 'Output Path', item.output_path ], | ||||
[ 'Mounts', ( | [ 'Mounts', ( | ||||
<WBAccordion names={ Object.keys(item.mounts) } | <WBAccordion names={ Object.keys(item.mounts) } | ||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
{ Object.keys(item.mounts).map(k => ( | { Object.keys(item.mounts).map(k => ( | ||||
<pre class="word-wrap">{ JSON.stringify(item.mounts[k], null, 2) }</pre> | |||||
<WBJsonViewer value={ item.mounts[k] } /> | |||||
)) } | )) } | ||||
</WBAccordion> | </WBAccordion> | ||||
) ], | ) ], | ||||
[ 'Runtime Constraints', ( | [ 'Runtime Constraints', ( | ||||
<WBAccordion names={ ['Runtime Constraints'] } | <WBAccordion names={ ['Runtime Constraints'] } | ||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
<pre class="word-wrap">{ JSON.stringify(item.runtime_constraints, null, 2) }</pre> | |||||
<WBJsonViewer value={ item.runtime_constraints } /> | |||||
</WBAccordion> | </WBAccordion> | ||||
) ], | ) ], | ||||
[ 'Runtime Status', ( | [ 'Runtime Status', ( | ||||
<WBAccordion names={ ['Runtime Status'] } | <WBAccordion names={ ['Runtime Status'] } | ||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
<pre class="word-wrap">{ JSON.stringify(item.runtime_status, null, 2) }</pre> | |||||
<WBJsonViewer value={ item.runtime_status } /> | |||||
</WBAccordion> | </WBAccordion> | ||||
) ], | ) ], | ||||
[ 'Scheduling Parameters', ( | [ 'Scheduling Parameters', ( | ||||
<WBAccordion names={ ['Scheduling Parameters'] } | <WBAccordion names={ ['Scheduling Parameters'] } | ||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
<pre class="word-wrap">{ JSON.stringify(item.scheduling_parameters, null, 2) }</pre> | |||||
<WBJsonViewer value={ item.scheduling_parameters } /> | |||||
</WBAccordion> | </WBAccordion> | ||||
) ], | ) ], | ||||
[ 'Output', item.output ? ( | [ 'Output', item.output ? ( | ||||
@@ -2,6 +2,7 @@ import { h, Component } from 'preact'; | |||||
import WBTable from 'wb-table'; | import WBTable from 'wb-table'; | ||||
import makeArvadosRequest from 'make-arvados-request'; | import makeArvadosRequest from 'make-arvados-request'; | ||||
import WBAccordion from 'wb-accordion'; | import WBAccordion from 'wb-accordion'; | ||||
import WBJsonViewer from 'wb-json-viewer'; | |||||
class WBWorkflowFields extends Component { | class WBWorkflowFields extends Component { | ||||
componentDidMount() { | componentDidMount() { | ||||
@@ -51,9 +52,9 @@ class WBWorkflowFields extends Component { | |||||
<WBAccordion names={ [ 'Inputs', 'Outputs', 'Rest' ] } | <WBAccordion names={ [ 'Inputs', 'Outputs', 'Rest' ] } | ||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
<pre class="word-wrap">{ JSON.stringify(it.inputs, null, 2) }</pre> | |||||
<WBJsonViewer value={ it.inputs } /> | |||||
<pre class="word-wrap">{ JSON.stringify(it.outputs, null, 2) }</pre> | |||||
<WBJsonViewer value={ it.outputs } /> | |||||
{ (() => { | { (() => { | ||||
delete it['inputs']; | delete it['inputs']; | ||||
@@ -63,7 +64,7 @@ class WBWorkflowFields extends Component { | |||||
delete it['doc']; | delete it['doc']; | ||||
delete it['id']; | delete it['id']; | ||||
return ( | return ( | ||||
<pre class="word-wrap">{ JSON.stringify(it, null, 2) }</pre> | |||||
<WBJsonViewer value={ it } /> | |||||
); | ); | ||||
})() } | })() } | ||||
@@ -77,7 +78,7 @@ class WBWorkflowFields extends Component { | |||||
cardHeaderClass="card-header-sm"> | cardHeaderClass="card-header-sm"> | ||||
{ graph.map(it => ( | { graph.map(it => ( | ||||
<pre class="word-wrap">{ JSON.stringify(it, null, 2) }</pre> | |||||
<WBJsonViewer value={ it } /> | |||||
)) } | )) } | ||||
</WBAccordion> | </WBAccordion> | ||||