Story #9043

Updated by Peter Amstutz over 5 years ago

CWL input form offer significantly more options than the existing Arvados pipeline template forms. Major points include arrays and union types (where more than one type of value is acceptable), which are characterized by the user needed to edit a list or select among different types which may offer different editing controls.

For Crunch v2, I think we should ignore the existing Rails-based pipeline template form code and write a new standalone form editor in Javascript.


* Can support editing complex input forms with lists and alternates without requiring AJAX.
* Can be developed independently from workbench and added in when tool selection / execution is ready, instead of being dependent on the tool selection flow
* More future proof, more likely to be usable in a future Workbench 2.0 which will likely be a single-page javascript application

Implementation strategy:

* Get the "inputs" section from the CWL document of interest
* Walk each top level field and invoke a "render" function
** The "render" function looks at the "type" field
** If the "type" field is a union type, render a type selector
** Render an editing control for the selected type
** Compound types (such as arrays) recursively render editing controls for each item in the type
* Provide "load" and "save" capabilities to populate and dump the form contents