This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 507
METRON-2029: Configure Table should have filter #1356
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruffle1986
reviewed
Mar 13, 2019
@@ -91,6 +95,46 @@ export class ConfigureTableComponent implements OnInit { | |||
}); | |||
} | |||
|
|||
ngAfterViewInit() { | |||
fromEvent(this.filterColResults.nativeElement, 'keyup') | |||
.pipe(debounceTime(250)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
metron-interface/metron-alerts/src/app/alerts/configure-table/configure-table.component.ts
Show resolved
Hide resolved
metron-interface/metron-alerts/src/app/alerts/configure-table/configure-table.component.ts
Show resolved
Hide resolved
Changeset reviewed, tested locally. Thanks, @sardell! +1 |
+1 by inspection. Very useful feature! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributor Comments
Link to original ASF ticket: https://jira.apache.org/jira/browse/METRON-2029?filter=-2
Previously, when a user opened the configure table panel, they would have to scroll down to see all the available column choices. This list can be really long and require a lot of scrolling and parsing for a user to find what they are looking for.
I added a simple filter so a user can more easily find the column they are looking for by either their original name or the display name they can optionally give a column.
Testing
metron-interface/metron-alerts
, runnpm ci
and thenscripts/scripts/start-dev.sh
configure-table.component.spec.ts
file and run them withng test
.Click on the gif below to see an expanded view of the filter in action.
Further Considerations
Currently, if a display name exists on a column, the filtering logic will only check against the display name. This was intentionally written on my part because I felt if a user renames a column with a display name, they are going to be searching for that column by display name.
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:
For code changes:
Have you included steps to reproduce the behavior or problem that is being changed or addressed?
Have you included steps or a guide to how the change may be verified and tested manually?
Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
Have you written or updated unit tests and or integration tests to verify your changes?
n/a
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
For documentation related changes:
n/a
[ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes viasite-book/target/site/index.html
:Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.