Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to select index pattern when creating filters in Control Visualizations #62115

Closed
JulGor opened this issue Apr 1, 2020 · 14 comments
Closed
Labels
bug Fixes for quality problems that affect the customer experience Feature:Input Control Input controls visualization Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@JulGor
Copy link

JulGor commented Apr 1, 2020

Kibana version: 7.6

Elasticsearch version: 7.6

Server OS version: N/A

Browser version: N/A

Browser OS version: N/A

Original install method (e.g. download page, yum, from source, etc.): Elastic Cloud

Describe the bug: When creating a new visualization "Control", I can choose the index pattern I want in the options of the control but if I need to add certain filter, I only can do it using the default (preferred) index pattern that may not match with the index pattern used in the control, so it's not possible to filter the documents.

Steps to reproduce:

  1. Create a new Visualization > Control
  2. Add a new control, e.g.: Option List
  3. In the new control options, specify an index pattern that doesn't match the default (preferred) index pattern and complete the control options choosing any field
  4. Add a new filter by clicking in the link "+ Add filter": the fields displayed doesn't match the index pattern chosen in the control settings and there is no way to change the index pattern of the filter

Expected behavior: The index pattern of the filter should be able to be changed or identify the index pattern from the controls' options and providing the list of the fields of all the index patterns used

Screenshots (if relevant):

Errors in browser console (if relevant):

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

Any additional context:

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Feature:Input Control Input controls visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure triage_needed labels Apr 1, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes timroes added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 7, 2020
@YamitCX
Copy link

YamitCX commented Feb 11, 2021

Is there any ETA on the fix?

@yashgupta4992
Copy link

Hi, Dose anyone knows any workaround for this issue ?

@ThomThomson
Copy link
Contributor

ThomThomson commented Mar 1, 2021

Input Controls are currently experimental. We are planning on doing a major overhaul of them in a coming version.

That said, I can think of a workaround, although it is pretty clunky. If you place the input controls on a dashboard with at least one visualization that uses the same non-default index pattern you can then change filters on the dashboard and see how they apply to the input control.

Edit: In looking at this again, it makes sense that input controls aren't affected by filters at all. Controls are meant to affect the filter bar, not the other way around.

Additionally, I can look into how easy this would be to fix.

@yashgupta4992
Copy link

Hi @ThomThomson , thanks much for your reply. I had already tried the workaround you are suggesting but it seems that he controls dose not tale the filters implemented at dashboard level.

@ThomThomson
Copy link
Contributor

See my updated comment above. I will keep this open, because applying changes from an input control to the filter bar in the editor results in a warning. If index patterns were propagated to the filter bar correctly, this wouldn't happen.

@search-tool
Copy link

Hi @ThomThomson , however your second edit is a valid statement. I think there are situations where this is realy nescsary, for example within metricbeat there are loads of different kind of servers and event.type combinations. I for one wanted a list of host.hostnames with an event.type of mssql but i get a list of all the hosts within metricbeat index. you cannot define a clear subset of stuff without doing filtering on a control this way.

@ThomThomson
Copy link
Contributor

@search-tool, the new controls system reacts to the dashboard filters. It will be available sometime in 8.x! Additionally, we are considering adding local filtering functionality to the new system so that you can write a query / a series of filters which only applies to one dropdown. See this comment for more info.

@llermaly
Copy link

llermaly commented Feb 3, 2022

I was trying to filter the select boxes to for example only show services of one type.

The workaround was to create a new option list with the filter values selected, then set this as the first box parent. Not elegant but works.

@StefanSa
Copy link

Hi @llermaly,
i am facing the same problem.
Can you please make a screenshot of your solution for better understanding.

thx

@llermaly
Copy link

@StefanSa I found an even better workaround, just create a filtered alias with the values you want to show, then point the controller to that alias.

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html

POST _aliases
{
"actions": [
{
"add": {
"index": "original-index",
"alias": "filtered-for-controller-index",
"filter": { "term" : { "some_field" : "some_value" } }
}
}
]
}

@StefanSa
Copy link

Ahh perfect, thank you.

@StefanSa
Copy link

OK, i'm struggling a bit with this solution with datastream index.
How do i best implement this solution here ?

@ThomThomson
Copy link
Contributor

Closing this in favour of #140112.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Input Control Input controls visualization Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

10 participants