Handlerbarjs in Visual Builder not allowing control when there is no data

(Rouble) #1

In a typical handlerbar js implementations the following code will result in the code in the else leg being hit if there is no data:

{{#if _all}}
    No widgets available

However, Visual Builder hijacks the visualization and shows:

Same is true for the following handlebar js code/syntax as well:

{{#each _all}}
    No widgets available

We need to be able to give endusers control of their displays if there is no data. This is a UX defect. If ES members agree, I can open a defect.

(Thomas Neirynck) #2

hi @rouble,

I'm not 100% following. Are you injecting these handle-bar scripts in the markdown of TSVB?

TSVB doesn't have full handlebar scripting support, it just uses the handlebars for variable-substitution.

(Rouble) #3

Yes @thomasneirynck. Think of the usecase where a user wants to control the markdown visualization if there is no data in _all. Currently, TSVB will hijack the visualization and show

But that is crude. What if I wanted to just have some text saying, 'No widgets available' or do something totally different if there is no data. Handlebar js syntax has a common way of allowing this feature via the {{else}} tag.

I understand that TSVB does not have full support for handlerbar js, but it would be nice to allow developers to control the markdown of a visualization when there is no data.

(Thomas Neirynck) #4

hi @rouble,

thanks, I understand better now. This sounds like an enhancement request for TSVB actually. I would submit one here: http://github.com/elastic/kibana/new

(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.