| @@ -44,7 +44,7 @@ class WBContainerFields extends Component { | |||||
| ) ], | ) ], | ||||
| [ 'Working Directory', item.cwd ], | [ 'Working Directory', item.cwd ], | ||||
| [ 'Command', ( | [ 'Command', ( | ||||
| <WBJsonViewer app={ app } value={ item.command } /> | |||||
| <WBJsonViewer app={ app } value={ item.command } pretty={ false } /> | |||||
| ) ], | ) ], | ||||
| [ 'Output Path', item.output_path ], | [ 'Output Path', item.output_path ], | ||||
| [ 'Mounts', ( | [ 'Mounts', ( | ||||
| @@ -76,7 +76,7 @@ class WBContainerRequestFields extends Component { | |||||
| ) ], | ) ], | ||||
| [ 'Working Directory', item.cwd ], | [ 'Working Directory', item.cwd ], | ||||
| [ 'Command', ( | [ 'Command', ( | ||||
| <WBJsonViewer app={ app } value={ item.command } /> | |||||
| <WBJsonViewer app={ app } value={ item.command } pretty={ false } /> | |||||
| ) ], | ) ], | ||||
| [ 'Output Path', item.output_path ], | [ 'Output Path', item.output_path ], | ||||
| [ 'Output Name', item.output_name ], | [ 'Output Name', item.output_name ], | ||||
| @@ -26,9 +26,9 @@ function detectIds(value, app) { | |||||
| } | } | ||||
| class WBJsonViewer extends Component { | class WBJsonViewer extends Component { | ||||
| render({ value, stringify, app }) { | |||||
| render({ value, stringify, app, pretty }) { | |||||
| if (stringify) | if (stringify) | ||||
| value = JSON.stringify(value, null, 2); | |||||
| value = pretty ? JSON.stringify(value, null, 2) : JSON.stringify(value); | |||||
| return ( | return ( | ||||
| <div class="wb-json-viewer">{ detectIds(value, app) }</div> | <div class="wb-json-viewer">{ detectIds(value, app) }</div> | ||||
| ); | ); | ||||
| @@ -36,7 +36,8 @@ class WBJsonViewer extends Component { | |||||
| } | } | ||||
| WBJsonViewer.defaultProps = { | WBJsonViewer.defaultProps = { | ||||
| stringify: true | |||||
| stringify: true, | |||||
| pretty: true | |||||
| }; | }; | ||||
| export default WBJsonViewer; | export default WBJsonViewer; | ||||