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

Add support for CIDR mask filters on IP fields #300

Merged
merged 1 commit into from
Apr 22, 2021
Merged

Add support for CIDR mask filters on IP fields #300

merged 1 commit into from
Apr 22, 2021

Conversation

micrictor
Copy link
Contributor

Signed-off-by: Michael Torres [email protected]

Description

Users of Dashboards will be able to specify CIDR strings as filters against IP fields

Issues Resolved

Issue posted initially against the upstream (Kibana) - elastic/kibana#50520

Users are not able to specify a CIDR netmask when using the filter UI.

Check List

  • New functionality includes testing.
    • All tests pass
  • [n/a] New functionality has been documented.
    • [n/a] New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

@mihirsoni mihirsoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR @micrictor. It would be great if you could create an Issue with details in project and refer it in a PR.

Comment on lines +194 to +207
it('should return true if ip address is valid CIDR string', () => {
const isValidParams = validateParams('192.168.0.0/24', 'ip');
expect(isValidParams).toBe(true);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add UT for passing 192.168.0.0//24

@odfe-release-bot
Copy link

✅   DCO Check Passed b17043b

@kavilla
Copy link
Member

kavilla commented Apr 19, 2021

Nice, working for me.

Screen Shot 2021-04-19 at 10 04 49 AM

kavilla
kavilla previously approved these changes Apr 19, 2021
@micrictor
Copy link
Contributor Author

Pushed in additional sad-path testing for CIDR notation.

This PR fixes #306

@odfe-release-bot
Copy link

✅   DCO Check Passed 5a597fc

Copy link
Contributor

@mihirsoni mihirsoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !! Thanks for adding tests.

Copy link
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mihirsoni mihirsoni linked an issue Apr 22, 2021 that may be closed by this pull request
@mihirsoni mihirsoni merged commit 7ad2b1b into opensearch-project:main Apr 22, 2021
kavilla pushed a commit that referenced this pull request May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] User cannot save a filter for ip field with CIDR notation value
4 participants