Input tiles events
Handling events emitted by input tiles.
{
'title' 'Discovery Dashboard'
'description' 'test'
'cellHeight' 120
'vars' { // list of dashboard variables (can be set via dashboard url too)
'triggerValue' [ NOW 1 d - NOW 1 d + ]
'startEndDates' [ NOW 1 d - NOW 1 d + ]
}
'options' { 'showErrors' true 'eventHandler' 'type=popup,tag=dashboard' 'timeMode' 'date' }
'tiles' [
{
'type' 'input:slider' 'w' 9 'h' 2 'x' 0 'y' 0
'title' 'Trigger Value'
'options' { 'input' { 'showButton' true } 'eventHandler' 'type=variable,tag=change_range' }
'macro' <% {
'data' [ NOW 1 d - NOW 1 d + ] // default value
'globalParams' { 'input' { 'min' NOW 10 d - 'max' NOW 10 d + 'value' [ NOW 8 d - NOW 8 d + ] } }
'events' [ { 'tags' 'input' 'type' 'variable' 'selector' 'triggerValue' } ]
} %>
}
{
'type' 'display' 'w' 12 'h' 2 'x' 0 'y' 2
'title' 'display result date range'
'options' { 'eventHandler' 'type=variable,tag=input' }
'macro' <% { 'data' $triggerValue <% ISO8601 %> F LMAP ->JSON } %>
}
{
'type' 'button' 'w' 3 'h' 2 'x' 9 'y' 0
'title' 'reset slider range'
'macro' <%
{
'data' <% { 'events' [ { 'tags' [ 'change_range' ] 'type' 'variable' 'value' {} } ] } %>
'globalParams' { 'button' { 'label' 'reset slider range' } }
}
%>
}
]
}
Found an issue on this page or something missing?
Tell us on
The Lounge, the Warp 10 Community Slack.