alan-turing-institute / simulate-middleware

Simulate middleware service.
http://simulate.readthedocs.io
0 stars 0 forks source link

Field component attribute #25

Closed masonlr closed 6 years ago

masonlr commented 6 years ago

Add "component" attribute on each field. The attribute is used to specify the type of component rendered in the front end, for example:

An example JSON serialisation of a field with the component attribute is

{
    "child_fields": [],
    "component": "slider",
    "name": "wall_velocity",
    "specs": [
        {
            "id": 59,
            "name": "min",
            "value": "0.1"
        },
        {
            "id": 60,
            "name": "max",
            "value": "2.0"
        },
        {
            "id": 61,
            "name": "step",
            "value": "0.01"
        },
        {
            "id": 62,
            "name": "default",
            "value": "0.5"
        },
        {
            "id": 63,
            "name": "units",
            "value": "m/s"
        }
    ]
}