You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2020/07/13 15:05:00 UTC

[jira] [Resolved] (AIRAVATA-3285) Interactive output view providers

     [ https://issues.apache.org/jira/browse/AIRAVATA-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcus Christie resolved AIRAVATA-3285.
---------------------------------------
    Resolution: Fixed

> 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)