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

Show required field mappings only for enabled rules #418

Conversation

amsiglan
Copy link
Collaborator

Description

Currently when creating a detector, we ask user to configure all unmapped rule alias fields for the input log type. However, we only need the mappings for rule fields corresponding to the enabled rules. In this PR, we filter out the unmapped fields to only include fields from enabled rules.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@amsiglan amsiglan requested a review from a team February 18, 2023 00:28
@amsiglan amsiglan added backport 2.x backport 2.6 Used for marking changes that must be merged into 2.6 branch labels Feb 20, 2023
@amsiglan amsiglan marked this pull request as draft February 22, 2023 04:06
@amsiglan amsiglan marked this pull request as ready for review March 9, 2023 01:05
@codecov-commenter
Copy link

Codecov Report

Merging #418 (ea5bbc6) into main (a88c791) will decrease coverage by 0.11%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
- Coverage   35.21%   35.11%   -0.11%     
==========================================
  Files         116      116              
  Lines        3149     3164      +15     
  Branches      501      503       +2     
==========================================
+ Hits         1109     1111       +2     
- Misses       1920     1933      +13     
  Partials      120      120              
Impacted Files Coverage Δ
...pages/CreateDetector/containers/CreateDetector.tsx 8.82% <0.00%> (-0.09%) ⬇️
...ector/components/DetectionRules/DetectionRules.tsx 5.55% <0.00%> (ø)
...eFieldMapping/containers/ConfigureFieldMapping.tsx 13.88% <0.00%> (+0.09%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@amsiglan amsiglan removed the backport 2.6 Used for marking changes that must be merged into 2.6 branch label Mar 10, 2023
@amsiglan amsiglan merged commit 1bbc4c5 into opensearch-project:main Mar 10, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 10, 2023
* show required field mappings only for enabled rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mock custom rule to match mapping in backend

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 1bbc4c5)
amsiglan added a commit that referenced this pull request Mar 14, 2023
* show required field mappings only for enabled rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mock custom rule to match mapping in backend

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 1bbc4c5)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
AWSHurneyt pushed a commit to AWSHurneyt/security-analytics-dashboards-plugin that referenced this pull request Jun 8, 2023
…ct#418) (opensearch-project#481)

* show required field mappings only for enabled rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mock custom rule to match mapping in backend

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 1bbc4c5)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
AWSHurneyt added a commit that referenced this pull request Jun 8, 2023
* [FEATURE] Provide empty states for Findings and Alerts page #471 (#494) (#519)

Signed-off-by: AWSHurneyt <[email protected]>

* fixed recent alerts & finding order; count for pie chart (#576) (#579)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 3812055)

Co-authored-by: Amardeepsingh Siglani <[email protected]>

* Show required field mappings only for enabled rules (#418) (#481)

* show required field mappings only for enabled rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mock custom rule to match mapping in backend

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 1bbc4c5)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>

* Resolved merge conflicts after cherry-picking PR 418.

Signed-off-by: AWSHurneyt <[email protected]>

* use user provided end date for x-axis calc (#584) (#604)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit c280bad)

Co-authored-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Amardeepsingh Siglani <[email protected]>
AWSHurneyt pushed a commit to AWSHurneyt/security-analytics-dashboards-plugin that referenced this pull request Oct 12, 2023
…ct#418) (opensearch-project#481)

* show required field mappings only for enabled rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mock custom rule to match mapping in backend

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 1bbc4c5)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
amsiglan pushed a commit that referenced this pull request Mar 16, 2024
* [FEATURE] Provide empty states for Findings and Alerts page #471 (#494) (#519)

Signed-off-by: AWSHurneyt <[email protected]>

* fixed recent alerts & finding order; count for pie chart (#576) (#579)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 3812055)

Co-authored-by: Amardeepsingh Siglani <[email protected]>

* Show required field mappings only for enabled rules (#418) (#481)

* show required field mappings only for enabled rules

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated mock custom rule to match mapping in backend

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit 1bbc4c5)

Co-authored-by: Amardeepsingh Siglani <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>

* Resolved merge conflicts after cherry-picking PR 418.

Signed-off-by: AWSHurneyt <[email protected]>

* use user provided end date for x-axis calc (#584) (#604)

Signed-off-by: Amardeepsingh Siglani <[email protected]>
(cherry picked from commit c280bad)

Co-authored-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Amardeepsingh Siglani <[email protected]>

cr: https://code.amazon.com/reviews/CR-93561817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants