[ 
https://issues.apache.org/jira/browse/AIRAVATA-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17142155#comment-17142155
 ] 

ASF subversion and git services commented on AIRAVATA-3285:
-----------------------------------------------------------

Commit ccfddae351c1bf096a7876b7c9f317a8641fe683 in airavata-django-portal's 
branch refs/heads/develop from Marcus Christie
[ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=ccfddae ]

AIRAVATA-3285 Add support for specifying a label and help text


> Interactive output view providers
> ---------------------------------
>
>                 Key: AIRAVATA-3285
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3285
>             Project: Airavata
>          Issue Type: Bug
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> Add support for interactive output viewers.
> h5. Design proposal
> The output view provider generate_data function signature is
> {code}
> def generate_data(self, request, experiment_output, experiment, 
> output_file=None):
>      ...
> {code}
> Propose changing this to
> {code}
> def generate_data(self, request, experiment_output, experiment, 
> output_file=None, **kwargs):
> {code}
> Where {{kwargs}} can hold additional, optional parameters that are controlled 
> by interactive widgets.
> To support interactivity, generate_data function should return a dictionary 
> that includes an *{{interactive}}* key with a dictionary of interactive 
> parameters and their current value. Depending on the type of value, an 
> interactive widget will be displayed in the portal to allow controlling that 
> value. For example, if the value is a boolean, a checkbox widget will be 
> displayed to allow the user to toggle that value.
> When interactive values are modified by the user, the {{generate_data}} 
> function will be called again with the interactive values passed as keyword 
> arguments. For example, if the interactive parameter is {{show_grid}} and it 
> is type boolean, then {{generate_data}} will be called like so
> {code}
> output_view_provider.generate_data(request, experiment_output, experiment, 
> output_file, show_grid=show_grid)
> {code}
> Other widget types:
> * integer, float - numeric slider with optional min, max, and step size 
> specification
> * string - text input
> * list of values, select one - drop down
> * list of values, select multiple - checkboxes
> h5. TODO
> - [x] refactor ui code for reusability amongst display types
> - [x] support interactive parameters for link and html display types
> - [x] implement string - text input type
> - [x] implement float - slider
> - [x] display current value on slider widget
> - [x] add validation support
> - [x] support integers in slider widget
> - -[ ] support keyboard interaction in slider widget- deferring for now
> - -[ ] implement multi-select - checkboxes- deferring for now
> - [x] update tutorial/documentation
> - [x] support for labels and help text
> - [x] support passing through type information for when it can't be inferred
> - -[ ] allow a shortcut where the interactive parameters are just name/value 
> pairs and the type is inferred?- deferring for now
> Resources:
> * took inspiration from 
> https://ipywidgets.readthedocs.io/en/latest/examples/Using%20Interact.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to