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

Enhanced Pipeline RuleUI #15851

Merged
merged 104 commits into from
Aug 10, 2023
Merged

Enhanced Pipeline RuleUI #15851

merged 104 commits into from
Aug 10, 2023

Conversation

gally47
Copy link
Contributor

@gally47 gally47 commented Jun 30, 2023

/nocl

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@moesterheld moesterheld marked this pull request as draft July 5, 2023 08:07
@grotlue grotlue mentioned this pull request Jul 5, 2023
9 tasks
@patrickmann patrickmann self-requested a review August 7, 2023 08:41
@patrickmann
Copy link
Contributor

These functions lack a primary parameter:
IsUrl, IsPeriod, Debug, IsJson, SetField, Syslog*Conversion, IsUrl

@patrickmann
Copy link
Contributor

Convert to source code does not notice when I click Update rule. The converted rule remains the previously saved version - I have to do Update rule & close to see the last changes.

@gally47 gally47 requested a review from ousmaneo August 8, 2023 14:19
@moesterheld
Copy link
Contributor

These functions lack a primary parameter: IsUrl, IsPeriod, Debug, IsJson, SetField, Syslog*Conversion, IsUrl

Added the primary parameter for all functions which already have rule builder metadata (e.g. not for the syslog ones)

Copy link
Contributor

@patrickmann patrickmann left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Contributor

@ousmaneo ousmaneo left a comment

Choose a reason for hiding this comment

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

Tested and LGTM!
I have added two small suggestions.

<Modal.Footer>
<Button type="button"
bsStyle="success"
onClick={async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this to a function?

Save
</Button>
<Button type="button"
onClick={() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also extract this to a function?

@moesterheld moesterheld merged commit 3bd82c7 into master Aug 10, 2023
2 checks passed
@moesterheld moesterheld deleted the enhanced-rulebuilder branch August 10, 2023 11:43
bernd pushed a commit that referenced this pull request Aug 16, 2023
* initial setup

* Rule Builder UI Help Icon (#15883)

* Extract function table into own component

* Migrate RuleHelper to typescript and functional component

* Add help icon and popover to rule block form

* generate simulator output

* Show function description in select list

* updated Cols to use xs

* Enhanced Simulator progress

* fix eslint issue

* add function groups and human readable names

backend for graylog/graylog-plugin-enterprise#5414

* Fix color for selected Option description and help box width

* set rulebuilder descriptor and primary param

* set rulebuilder descriptor and primary param

* set rulebuilder descriptor and primary param

* set rulebuilder descriptor and primary param

* fix: sort by rulebuilder name

* set rulebuilder descriptor and primary param

* remove boolean functions from actions

* Show output and use rule_builder_name

* repositioned Show Simulator

* display a simpler version of Rule Ref on RuleBuilder

* add SourceCodeEditor button

* fix reset simulation

* update css heights

* fix: generate simulator fields only on simulate

* put rule builder step variables into custom result node

* evaluate conditions in simulation

* Show select list for output variables for primary inputs

* Generate dynamic output variable list and show filtered list in fields

* Remove unused functions and code

* Don't add or update when required fields are missing and mark optional fields

* Fix proptype for RuleHelperTable

* Show variable names in Block Display

* Fix linter errors in Input component

* Fix input console error

* fix getDictForFunction undefined error

* Filter out variables without output and rename output var name

* readd handling of undefined dict in outputvariables

* Fix wrong license header in RuleBuilder

* integrated simulation api changes

* real time simulation

* show simulation conditions/actions outputs

* add condition groups

* fix failing tests, adjust to grouped conditions

* Rule Simulation label

* Remove params from display

* updated conditions/actions output keys

* add extractor fragments and fragment tests

* Show return type next to output

* Reduce spacing between output and block headline

* Fix existing tests and add new test cases

* Fix type errors and remove attrs usage in styled components

* add field type conditions, remove type check conditions, add metadata

* add date functions, add metadata

* added unit tests to simulator

* add string functions, function metadata

* unit test for simulator conditions/actions output

* fix missing name and conditions

* fixed tests

* direct navigation to rule builder after clicking create rule button

* add string conditions

* fix condition titles

* clean up conditions

* fix delete rule errors

* reposition sourceCodeEditor button and showSimulator switch

* Don't check for previousOutputPresent anymore

* Move Toggle to it's own component

* use theme spacing

* navigate to rules list onCancel instead of history.goBack

* add additional extractors and tests

* add grok matches condition

* Fix simulation result reset with the default simulation message when updating an action

* converted Rule.jsx to typescript

* Declare variableType as optional on type and propTypes

* fix grok matches and grok extractor, add tests

* update grok extractor title

* fix booleans in titles

* add suppress forbiddenapi usage in tests

* add split index extractor

* disable functions with incompatible return types and parameters

* disable functions with incompatible return types and parameters

* fix reenable set_field

* add lookup extractor

* add lookup extractor fragment

* added ConfirmNavigateToSourceCodeEditorModal

* Function typos, missing primary parameters

* Update logger name

Co-authored-by: Patrick Mann <[email protected]>

* completely remove deleted test

* fix logger name

* move `addFragment` upsert functionality to `RuleFragmentService`

* extract functions

---------

Co-authored-by: Laura Bergenthal-Grotlüschen <[email protected]>
Co-authored-by: Laura <[email protected]>
Co-authored-by: Matthias Oesterheld <[email protected]>
Co-authored-by: Matthias Oesterheld <[email protected]>
Co-authored-by: Patrick Mann <[email protected]>
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.

5 participants