Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Dashboard] Support Filterbox validators #13341

Closed
cccs-jc opened this issue Feb 25, 2021 · 2 comments
Closed

[Dashboard] Support Filterbox validators #13341

cccs-jc opened this issue Feb 25, 2021 · 2 comments
Labels
enhancement:committed Enhancement planned / committed by a contributor viz:charts:filterbox Related to the Filterbox viz type

Comments

@cccs-jc
Copy link
Contributor

cccs-jc commented Feb 25, 2021

Describe the solution you'd like

Ability to specify a validators inside a FilterBox.

We use Superset in the context of Security information and event management (SIEM). Our data often include IP values which users want to filter by adhoc IP ranges (using CIDR notation).

For example when the user inputs a filter value of 192.168.0.0/24 this filter is converted into a range query on the server side. We leverage jinja templating to convert the IP range into an SQL statement like

((IP_COLUMN >= lowIP) AND (IP_COLUMN <= highIP))

This works quite well however there is no validation of the text provided by the user. Ideally we would like to validate the input in the client a bit like is done in the explorer UI.

It's possible to validate inputs in the explore UI since the viz populates the control panel and is free to customize the input control. However there is no way to specify a validator in a FilterBox.

Is this a feature being developed? Are there alternatives?

@cccs-jc cccs-jc changed the title [Explore]Set default filterbox value using SQL statement [Dashboard] Support Filterbox validators Feb 25, 2021
@junlincc junlincc added enhancement:committed Enhancement planned / committed by a contributor viz:charts:filterbox Related to the Filterbox viz type labels Feb 28, 2021
@junlincc
Copy link
Member

@cccs-jc thanks for suggesting. we got this request quite often. the reason we are holding off on this is that FilterBox will be replaced by dashboard native filter #12148 as it rolls out. please follow step to enable the new feature and let us know if it doesn't work for you case. if not(likely), we are committed to make enhancement on the new solution.

@cccs-jc
Copy link
Contributor Author

cccs-jc commented Mar 3, 2021

@junlincc it does not work in the native filters either. I'll will write a comment in the issue you mentioned. Thanks.

@apache apache locked and limited conversation to collaborators Apr 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement:committed Enhancement planned / committed by a contributor viz:charts:filterbox Related to the Filterbox viz type
Projects
None yet
Development

No branches or pull requests

3 participants