airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Christie (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AIRAVATA-2761) Experiment input editors: express, enforce dependencies between input editors
Date Thu, 27 Dec 2018 20:22:00 GMT

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

Marcus Christie edited comment on AIRAVATA-2761 at 12/27/18 8:21 PM:
---------------------------------------------------------------------

Example of the dependencies schema: 
{noformat}
{
    "editor": {
        "dependencies": {
            "show": {
                "OR": [
                    {
                        "A": {
                            "comparison": "equals",
                            "value": "foo"
                        }
                    },
                    {
                        "C": {
                            "comparison": "equals",
                            "value": "pizza"
                        }
                    }
                ]
            }
        }
    }
}
{noformat}

This is input metadata for the input "B". There are two other inputs named "A" and "C". This
dependency rule is saying that the "B" input should only be shown when the value of input
"A" is "foo" _OR_ the value of input "C" is "pizza". In addition to "OR" one can also use
boolean operators "AND" and "NOT".

Currently I've only implemented the "equals" comparison but more could be added fairly easily
(see the [implementation of the "equals" comparison|https://github.com/apache/airavata-django-portal/blob/master/django_airavata/apps/api/static/django_airavata_api/js/models/dependencies/BooleanExpressionEvaluator.js#L86]).



was (Author: marcuschristie):
Example of the dependencies schema: 
{noformat}
{
    "editor": {
        "dependencies": {
            "show": {
                "OR": [
                    {
                        "A": {
                            "comparison": "equals",
                            "value": "foo"
                        }
                    },
                    {
                        "C": {
                            "comparison": "equals",
                            "value": "pizza"
                        }
                    }
                ]
            }
        }
    }
}
{noformat}

This is input metadata for the input "B". There are two other inputs named "A" and "C". This
dependency rule is saying that the "B" input should only be shown when the value of input
"A" is "foo" _OR_ the value of input "C" is "pizza".

Currently I've only implemented the "equals" comparison but more could be added fairly easily
(see the [implementation of the "equals" comparison|https://github.com/apache/airavata-django-portal/blob/master/django_airavata/apps/api/static/django_airavata_api/js/models/dependencies/BooleanExpressionEvaluator.js#L86]).


> Experiment input editors: express, enforce dependencies between input editors
> -----------------------------------------------------------------------------
>
>                 Key: AIRAVATA-2761
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2761
>             Project: Airavata
>          Issue Type: Sub-task
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> Allow some experiment input editors to only show or only be required based on values
provided to other inputs.
> TODO
> * [ ] Transition when inputs are hidden/shown
> * [x] Unit tests for dependency evaluation logic
> * [x] Error handling/reporting
> * [x] suppress validation errors when input is hidden
> * [ ] unset value when input is hidden (restore user input value when input is shown
again?)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message