Skip to content

Commit

Permalink
Add POC engine UX (#6803)
Browse files Browse the repository at this point in the history
* Added engine plugin with a first nav menu and a simple react router system

* Added simple styles

* Mocked imposter

* added kvdb

* feat(rules): create Rules section on Engine app

- List rules
- Rule detail on flyout with tabs:
  - Table
  - JSON
  - Relationship (visualization)
  - Events
- Import file
- Create new rule
  - Visual editor (form)
  - File editor
- Adapt components from main to support the required use cases
- Add plugin dependencies to engine plugin
- Enhance DocViewer component
- Create component to fetch and display data from indexer

* feat(script): sample data generator for rules dataset

* feat(engine): switch order menu and replace placeholders on views

* feat(engine): use wazuh-asset specification to manage the creation or list of rules

* fix: useForm for arrayOf type

* Add routing, db creation, actions buttons are replaced and imposter response from pathname change

* feat(engine): enhance and fix rule asset components

- fix bugs on TableIndexer component
- replace icon on export formatted button of TableIndexer component
- rename rule creation endpoint path from new to create
- add spec merge for rule asset
- move rule detail flyout to another component
- enhance the form to create rule asset
- create withGuard, withGuardAsync and withDataSourceFetch HOCs
- add component to edit the rule asset
- enhance render of rule and parents on Rule asset list
- enhance utils to transform the spec

* Create database feat updated

* feat(engine): refactor form based on group of inputs

* remove(engine): unused script files related to rules sample data

* feat(engine): enhance sample data rule dataset

* feat(engine): add filters and outputs sample data datasets

* feat(engine): add view of outputs asset

* feat(engine): enhance the sample data injector script documentation

* Decoders

* feat: add ability to remove field form arrayOf form field

* feat(engine): enhance components

- Create component to select the configuration method
  - Replace the creator with configuration method switch
- Create paths for editors or rules and outputs
- Enhance spec of rule and outputs
- Enhance render of arrayOf form fields on form editor

* feat(sample-data): add dataset of integrations

* feat(engine): add integrations section

* feat(engine): rename form component and minor fixes

* Some routes changed, added interactive path to columns

* fix(form): fix form when using arrayOf

* feat(engine): enhance rule form

* fix(form): remove console.log on hook

* Changes on decoders

* Added somes styles to flyouts

* Directories changes and policies first steps

* feat(engine): enhance form

* Added colums to policies

* Prettier

---------

Co-authored-by: Antonio David Gutiérrez <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>
  • Loading branch information
3 people authored Aug 23, 2024
1 parent a1fc490 commit 0cf78ba
Show file tree
Hide file tree
Showing 178 changed files with 11,005 additions and 522 deletions.
2 changes: 1 addition & 1 deletion docker/imposter/api-info/api_info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"data": {
"title": "Wazuh API REST",
"api_version": "4.10.0",
"api_version": "5.0.0",
"revision": 1,
"license_name": "GPL 2.0",
"license_url": "https://github.com/wazuh/wazuh/blob/4.5/LICENSE",
Expand Down
61 changes: 61 additions & 0 deletions docker/imposter/decoders/get_decoders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"data": {
"affected_items": [
{
"name": "decoder/journald/3",
"parents": [],
"module": "journald-http",
"title": "Journald HTTP Agents error logs decoder",
"description": "Decoder for Journald HTTP Agents error logs.",
"versions": ["2.2.31"],
"compatibility": "The Apache datasets were tested with Apache 2.4.12 and 2.4.46 and are expected to work with all versions >= 2.2.31 and >= 2.4.16 (independent from operating system).",
"author": {
"name": "",
"date": "",
"email": ""
},
"references": []
},
{
"name": "decoder/systemctl/1",
"parents": ["journald"],
"module": "systemctl-http",
"title": "Systemctl Manager error logs decoder",
"description": "Decoder for Systemctl Manager error logs.",
"versions": [],
"compatibility": "The Apache datasets were tested with Apache 2.4.12 and 2.4.46 and are expected to work with all versions >= 2.2.31 and >= 2.4.16 (independent from operating system).",
"author": {
"name": "Wazuh Inc.",
"date": "2021-12-31",
"email": "[email protected]"
},
"references": [
"https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/decoders.html"
]
},
{
"name": "decoder/apache-access/0",
"parents": ["decoder/apache-common/0", "decoder/journald-apache/0"],
"module": "apache-http",
"title": "Apache HTTP Server error logs decoder",
"description": "Decoder for Apache HTTP Server error logs.",
"versions": ["2.2.31", "2.4.16"],
"compatibility": "The Apache datasets were tested with Apache 2.4.12 and 2.4.46 and are expected to work with all versions >= 2.2.31 and >= 2.4.16 (independent from operating system).",
"author": {
"name": "Wazuh Inc.",
"date": "2023-11-29",
"email": ""
},
"references": [
"https://httpd.apache.org/docs/2.4/logs.html",
"https://httpd.apache.org/docs/2.4/custom-error.html"
]
}
],
"total_affected_items": 3,
"total_failed_items": 0,
"failed_items": []
},
"message": "All selected decoders were returned",
"error": 0
}
25 changes: 25 additions & 0 deletions docker/imposter/lists/get_lists.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"data": {
"affected_items": [
{
"filename": "test1",
"relative_dirname": "mockPath/test/1",
"elements": "8",
"date": "2024-06-03",
"description": "test mock"
},
{
"filename": "test2",
"relative_dirname": "mockPath/test/version2",
"elements": "76",
"date": "2024-06-02",
"description": "test 2 mock"
}
],
"total_affected_items": 2,
"total_failed_items": 0,
"failed_items": []
},
"message": "All specified lists were returned",
"error": 0
}
Loading

0 comments on commit 0cf78ba

Please sign in to comment.