elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.8k stars 8.19k forks source link

Filter cannot fetch fields on a Dashboard when a Markdown vis is present along other visualizations #12627

Closed daragies closed 7 years ago

daragies commented 7 years ago

Kibana version: 5.5 bc9

Elasticsearch version: 5.5 bc9

Server OS version: MacOS Sierra Version 10.12.5

Browser version: Google Chrome Version 59.0.3071.115 (Official Build) (64-bit)

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.): Installed bc9 from staging.elastic.co

Description of the problem including expected versus actual behavior: Expected the filter dropdown to populate with available fields. The dropdown didn't populate.

Steps to reproduce:

  1. Load ElasticStack_apache data from examples repo. https://github.com/elastic/examples/tree/master/ElasticStack_apache
  2. Import Kibana dashboard from ElasticStack_apache example. https://github.com/elastic/examples/tree/master/ElasticStack_apache
  3. Open dashboard
  4. Click on Add a Filter
  5. The Filter dropdown should populate with fields
  6. View h

Errors in browser console (if relevant):

screen shot 2017-07-01 at 8 22 27 am

Provide logs and/or server output (if relevant):

daragies commented 7 years ago

Reproduced in Safari and Firefox

nreese commented 7 years ago

Looks like getFieldOptions in src/ui/public/filter_editor/lib/filter_editor_utils.js gets passed an array of indexpatterns. Because the markdown panel does not require any aggregation results, it has no index pattern. As a result, indexpatterns that is passed to getFieldOptions contains an element that is undefined and this causes the problem.

marius-dr commented 7 years ago

I did some investigation into this and it seems to be related to the presence of a Markdown viz on the dashboard. If you have only a Markdown viz, we don't show the "Add filter" button, but if you also have another viz on the dashboard (which will be the case for 99% of the users), the Fields dropdown for the Filter won't be able to populate with values.