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

Adapt files api endpoints #1033

Merged
merged 6 commits into from
Mar 29, 2021
Merged

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Mar 26, 2021

Description

Hi team, this PR resolves:

  • Adapt the calls to endpoints about rules/decoders/files content, saving and editing
  • Fixed export of CDB list keys and values

Closes #1025

Checks

Use Wazuh API 4.1.3

  • Rules
    • See file content
    • Edit and save content
    • Delete file
    • Import file
    • See file content from the rule detail
  • Decoders
    • See file content
    • Edit and save content
    • Delete file
    • Import file
    • See file content from the decoder detail
  • CDB List
    • See file content
    • Edit and save content
    • Delete file
    • Import file
    • Export keys and values as .csv file

@Desvelao Desvelao added the type/bug Bug issue label Mar 26, 2021
@Desvelao Desvelao requested a review from a team March 26, 2021 12:55
@Desvelao Desvelao self-assigned this Mar 26, 2021
Desvelao and others added 4 commits March 26, 2021 14:24
  - Fix links to open a rule/decoder file from details
  - Fix some html elements didn't show duw to deprecated conditionals related to API response objects
@Desvelao
Copy link
Member Author

Changes

  • Fixed the import/uploading files functionality
  • Fixed some links in rule/decoder details to open the related file
  • Fixed some HTML elements that didn't show related to deprecated fields API response object

@Desvelao Desvelao linked an issue Mar 29, 2021 that may be closed by this pull request
21 tasks
@sortiz1191 sortiz1191 self-requested a review March 29, 2021 14:27
@Desvelao Desvelao marked this pull request as ready for review March 29, 2021 14:32
Copy link
Contributor

@pablomarga pablomarga left a comment

Choose a reason for hiding this comment

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

Rules

  • Create
  • Edit
  • Remove
  • Import
  • See file content from the rule detail

Decoders

  • Create
  • Edit
  • Remove
  • Import
  • See file content from the decoder detail

CBD lists

  • Create
  • Edit
  • Remove
  • Import
  • Export keys and values as .csv file

Everything seems to work fine, great job! LGTM!

Copy link
Contributor

@sortiz1191 sortiz1191 left a comment

Choose a reason for hiding this comment

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

Rules

  • Create
  • Edit
  • Remove
  • Import
  • See file content from the rule detail

Decoders

  • Create
  • Edit
  • Remove
  • Import
  • See file content from the decoder detail

CBD lists

  • Create
  • Edit
  • Remove
  • Import
  • Export keys and values as .csv file

Everything is working properly. Great job! 👏

Copy link
Contributor

@frankeros frankeros left a comment

Choose a reason for hiding this comment

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

tested ✔️
great job!! 🎉

@frankeros frankeros merged commit 1b384fa into 4.1-8.1 Mar 29, 2021
@frankeros frankeros deleted the fix/1025-adapt-files-api-endpoints branch March 29, 2021 18:38
frankeros added a commit that referenced this pull request Mar 30, 2021
escaped back slash in File parameter request (#1040)

fix(frontend): Fix CSV files names of Management > Groups section (#1038)

fix(reports): Fix visualizations in reports due to vertical position and exceeding the horizontal page limit (#1037)

fix(frontend): Fix the view of regex field in Decoder detail (#1036)

update version to 4.1.4

feat(scripts): Added script to generate the API info (#1035)

- Update info to API info to Wazuh API 4.1.3
Added dialog with file registry values (#1030)

Changed equal operator to 'like' operator (#1034)

Adapt files api endpoints (#1033)

* fix(frontend): Adapted read, edit and delete rules/decoders/lists to new API endpoints

* fix(frontend): Add exporting CDB list keys and values

* fix(frontend): remove commented line in ruleset.js

* Migrated upload files endpoints

* fix(frontend): Fix import/upload rule/decoder/list file

* fix(frontend): fix links to open a rule/decoder file from details

  - Fix links to open a rule/decoder file from details
  - Fix some html elements didn't show duw to deprecated conditionals related to API response objects

Co-authored-by: Franco Charriol <francocharriol@gmail.com>
pinned filter buttons blinks (#1032)

Redirect to overview if there isn't previous currentTab status (#1028)

* Redirect to overview if there isn't previous currentTab status

* Added check current api in navigation service

* Fixed bug that appear for an instant settings.api at start

* Added else

* Fixed the text of no api when we have it

Co-authored-by: Franco Charriol <francocharriol@gmail.com>
Update version to 4.1.3

fix select node in status and logs views (#1017)

Fixed log error when you entry to cluster or status (#1015)

Fixed Agents table status filter doesn't work (#1016)

Co-authored-by: Ibarra Maximiliano <maximiliano.ibarra@wazuh.com>
Fixed agents table version filter unknown value error (#1018)

Merge pull request #1001 from wazuh/bufix/paginator-reporting

Fixed paginator on reporting view.
Merge pull request #1000 from wazuh/fix/997-enhance-pdf-reports-visual-problems

Enhance some visual problems in PDF reports
Fixed paginator on reporting view.

fix(reporting): Enhance PDF reports
  - Wazuh logo image not stretch
  - Removed rare character at the end of the section
  - Visualizations not stretched. Centered horizontally

Fix writing errrors (#996)

Adapt for Wazuh 4.0.4 and Splunk 8.1.1 (#994)

* Update README.md

* change python controllers

* Fixed api requests from agent and agent overview views

* add token.py and changes request

* migrate view configuration

* Migrating Agents views and api requests, Security information managment, auditing and policy monitoring, regulatory compilance

* migrate view ruleset

* Adapted Agents,cisca,docker,hippa,nist,osquery,virustotal, vulnerabilities

* Adapted overview general and welcome

* migrate view groups

* migrate view cluster

* fix api errors

* fix report views

* fix api and views errors

* fix api and views errors

* fix logs views

* Fixed managment ruleset, rules,decoders, list.

* Fixed Rulesets,save edited file configuration

* Fixed Rules save edited xml file

* Changed autocomplete suggestions to api 4.0 endpoints

* fix xml editor

* delete logs

* fix py imports

* fix add and remove agents from group

* Fixed return of request contemplating both options.

* Fixed watuhtoken imports

* fix healchek request

* delete console log

* Fixed, doesnt show last scan in agent inventory data, processes and packages tables

* Fixed generate report in agents inventory data

* Fix filter all values of daemons and log level. (#960)

* Fixed watuhtoken imports (#958)

* Fixed methods duplicated

* fix splunk version and conection manager

* Fixed removed endpoints with query params

* Fixed osquery error message when it is installed

* Refactored wazuhtoken use

* Added missing self

* Fixed commands to create new agents

* fix(monitoring): Fix job when cluster mode is disabled

* Conditional added to see if the cluster enabled

* Removed Run Scan action in agents policy monitoring

* Removed sort in file column in agents sca table

* Fixed cluster disabled issues

* fix(frontend): Add the missing reporting button in the Vulnerabilities module

* Fix manager was shown in visualization

* Fixed typo runnin

* fix(backend): update API endpoints with 4.0.4
  - Added a `endpoints.json` file
  - Added a service to retrieve the endpoints from the .json file

* fix(backend): load the app log file using the relative path to Splunk directory

* fix(frontend): add app log file directory to Logs section using the relative to Splunk home directory

* Fix help urls (#974)

* Changed help url

* Fixed duplicated header on discover (#976)

* Fixed duplicated header on discover

* fix empty configs (#977)

* delete console logs (#979)

* Fixing bad exception catch in dev tools

* Update api.py

* Update api.py

* Removed generate report in Agents SCA view

* Fix style error dev tools

* Improve hints dev tools

* Replace monitoring index from wazuh-monitoring-3x to wazuh-monitoring (#981)

* fix(monitoring): Change monitoring index from wazuh-monitoring-3x to wazuh-monitoring
  - Modified `inputs.conf`
  - Modified index filter in the agent status visualization

* feat(setup): Add configuration files for indexer and forwarder

* overlaping tooltips

* Added information button

* fix(frontend): Fix help side section in Configuration - Docker listener

* fix export table and show most active agent

* fix(frontend): Configuration > Alerts > Email alerts section didn't display anything when emails are not configurated

* Fixed error when generate report agents fim

* removed console log

* Hide report button when visualizations are hidden

* fix(frontend): Fixed resquest doesn't run in Dev tools and align text containers

* Fixed save config manager mode and section config cluster

* fix(fronted): Fix link to the group in Agent overview and agent platform set incorrectly (#990)

* fix delete list

* fix update list

Co-authored-by: Juanca Rodríguez <juanca.romo9@gmail.com>
Co-authored-by: Pablo Torres <pablotr9@correo.ugr.es>
Co-authored-by: Jose Sanchez Robles <josesanxez@gmail.com>
Co-authored-by: eze9252 <eze9252@gmail.com>
Co-authored-by: Ibarra Maximiliano <maximiliano.ibarra@wazuh.com>
Co-authored-by: Ezequiel Airaudo <36004787+eze9252@users.noreply.github.com>
Co-authored-by: gabiwassan <gabriel.wassan@wazuh.com>
Co-authored-by: Gabriel Wassan <gabrielwassan@gmail.com>
Co-authored-by: Maximiliano Ibarra <maximilianoaibarra@gmail.com>
Co-authored-by: CPAlejandro <cuellarpeinado@gmail.com>
Co-authored-by: Desvelao <iamdesvelao@gmail.com>
Co-authored-by: Pablo Martínez <pablomarga@hotmail.com>
Co-authored-by: Alejandro Cuéllar Peinado <alejandro.cuellar@wazuh.com>
Co-authored-by: Toni <34042064+Desvelao@users.noreply.github.com>
Co-authored-by: sortiz <sortiz@owlh.net>
frankeros added a commit that referenced this pull request Apr 23, 2021
* Adapt for 4.0.4-8.1.1

* Adapt for Wazuh 4.0.4 and Splunk 8.1.1 (#994)

* Update README.md

* change python controllers

* Fixed api requests from agent and agent overview views

* add token.py and changes request

* migrate view configuration

* Migrating Agents views and api requests, Security information managment, auditing and policy monitoring, regulatory compilance

* migrate view ruleset

* Adapted Agents,cisca,docker,hippa,nist,osquery,virustotal, vulnerabilities

* Adapted overview general and welcome

* migrate view groups

* migrate view cluster

* fix api errors

* fix report views

* fix api and views errors

* fix api and views errors

* fix logs views

* Fixed managment ruleset, rules,decoders, list.

* Fixed Rulesets,save edited file configuration

* Fixed Rules save edited xml file

* Changed autocomplete suggestions to api 4.0 endpoints

* fix xml editor

* fix xml editor

* delete logs

* fix py imports

* fix add and remove agents from group

* Fixed return of request contemplating both options.

* Fixed watuhtoken imports

* fix healchek request

* delete console log

* Fixed, doesnt show last scan in agent inventory data, processes and packages tables

* Fixed generate report in agents inventory data

* Fix filter all values of daemons and log level. (#960)

* Fixed watuhtoken imports (#958)

* Fixed methods duplicated

* fix splunk version and conection manager

* Fixed removed endpoints with query params

* Fixed osquery error message when it is installed

* Refactored wazuhtoken use

* Added missing self

* Fixed commands to create new agents

* fix(monitoring): Fix job when cluster mode is disabled

* Conditional added to see if the cluster enabled

* Removed Run Scan action in agents policy monitoring

* Removed sort in file column in agents sca table

* Fixed cluster disabled issues

* fix(frontend): Add the missing reporting button in the Vulnerabilities module

* Fix manager was shown in visualization

* Fixed typo runnin

* fix(backend): update API endpoints with 4.0.4
  - Added a `endpoints.json` file
  - Added a service to retrieve the endpoints from the .json file

* fix(backend): load the app log file using the relative path to Splunk directory

* fix(frontend): add app log file directory to Logs section using the relative to Splunk home directory

* Fix help urls (#974)

* Changed help url

* Fixed duplicated header on discover (#976)

* Fixed duplicated header on discover

* fix empty configs (#977)

* delete console logs (#979)

* Fixing bad exception catch in dev tools

* Update api.py

* Update api.py

* Removed generate report in Agents SCA view

* Fix style error dev tools

* Improve hints dev tools

* Replace monitoring index from wazuh-monitoring-3x to wazuh-monitoring (#981)

* fix(monitoring): Change monitoring index from wazuh-monitoring-3x to wazuh-monitoring
  - Modified `inputs.conf`
  - Modified index filter in the agent status visualization

* feat(setup): Add configuration files for indexer and forwarder

* overlaping tooltips

* Added information button

* fix(frontend): Fix help side section in Configuration - Docker listener

* fix export table and show most active agent

* fix(frontend): Configuration > Alerts > Email alerts section didn't display anything when emails are not configurated

* Fixed error when generate report agents fim

* removed console log

* Hide report button when visualizations are hidden

* fix(frontend): Fixed resquest doesn't run in Dev tools and align text containers

* Fixed save config manager mode and section config cluster

* fix(fronted): Fix link to the group in Agent overview and agent platform set incorrectly (#990)

* fix delete list

* fix update list

Co-authored-by: Juanca Rodríguez <juanca.romo9@gmail.com>
Co-authored-by: Pablo Torres <pablotr9@correo.ugr.es>
Co-authored-by: Jose Sanchez Robles <josesanxez@gmail.com>
Co-authored-by: eze9252 <eze9252@gmail.com>
Co-authored-by: Ibarra Maximiliano <maximiliano.ibarra@wazuh.com>
Co-authored-by: Ezequiel Airaudo <36004787+eze9252@users.noreply.github.com>
Co-authored-by: gabiwassan <gabriel.wassan@wazuh.com>
Co-authored-by: Gabriel Wassan <gabrielwassan@gmail.com>
Co-authored-by: Maximiliano Ibarra <maximilianoaibarra@gmail.com>
Co-authored-by: CPAlejandro <cuellarpeinado@gmail.com>
Co-authored-by: Desvelao <iamdesvelao@gmail.com>
Co-authored-by: Pablo Martínez <pablomarga@hotmail.com>
Co-authored-by: Alejandro Cuéllar Peinado <alejandro.cuellar@wazuh.com>
Co-authored-by: Toni <34042064+Desvelao@users.noreply.github.com>
Co-authored-by: sortiz <sortiz@owlh.net>

* Fix writing errrors (#996)

* fix(reporting): Enhance PDF reports
  - Wazuh logo image not stretch
  - Removed rare character at the end of the section
  - Visualizations not stretched. Centered horizontally

* Fixed paginator on reporting view.

* Fixed agents table version filter unknown value error (#1018)

* Fixed Agents table status filter doesn't work (#1016)

Co-authored-by: Ibarra Maximiliano <maximiliano.ibarra@wazuh.com>

* Fixed log error when you entry to cluster or status (#1015)

* fix select node in status and logs views (#1017)

* Update version to 4.1.3

* Redirect to overview if there isn't previous currentTab status (#1028)

* Redirect to overview if there isn't previous currentTab status

* Added check current api in navigation service

* Fixed bug that appear for an instant settings.api at start

* Added else

* Fixed the text of no api when we have it

Co-authored-by: Franco Charriol <francocharriol@gmail.com>

* pinned filter buttons blinks (#1032)

* Adapt files api endpoints (#1033)

* fix(frontend): Adapted read, edit and delete rules/decoders/lists to new API endpoints

* fix(frontend): Add exporting CDB list keys and values

* fix(frontend): remove commented line in ruleset.js

* Migrated upload files endpoints

* fix(frontend): Fix import/upload rule/decoder/list file

* fix(frontend): fix links to open a rule/decoder file from details

  - Fix links to open a rule/decoder file from details
  - Fix some html elements didn't show duw to deprecated conditionals related to API response objects

Co-authored-by: Franco Charriol <francocharriol@gmail.com>

* Changed equal operator to 'like' operator (#1034)

* Added dialog with file registry values (#1030)

* feat(scripts): Added script to generate the API info (#1035)

- Update info to API info to Wazuh API 4.1.3

* update version to 4.1.4

* fix(frontend): Fix the view of regex field in Decoder detail (#1036)

* fix(reports): Fix visualizations in reports due to vertical position and exceeding the horizontal page limit (#1037)

* fix(frontend): Fix CSV files names of Management > Groups section (#1038)

* escaped back slash in File parameter request (#1040)

* Added compatibility range with splunk version

* Re-ordered compatibility matrix on README

* Bumped to 4.1.5

* doc: fix package url for 4.1.5

Co-authored-by: Juanca Rodríguez <juanca.romo9@gmail.com>
Co-authored-by: Pablo Torres <pablotr9@correo.ugr.es>
Co-authored-by: Jose Sanchez Robles <josesanxez@gmail.com>
Co-authored-by: eze9252 <eze9252@gmail.com>
Co-authored-by: Ibarra Maximiliano <maximiliano.ibarra@wazuh.com>
Co-authored-by: Ezequiel Airaudo <36004787+eze9252@users.noreply.github.com>
Co-authored-by: gabiwassan <gabriel.wassan@wazuh.com>
Co-authored-by: Gabriel Wassan <gabrielwassan@gmail.com>
Co-authored-by: Maximiliano Ibarra <maximilianoaibarra@gmail.com>
Co-authored-by: CPAlejandro <cuellarpeinado@gmail.com>
Co-authored-by: Desvelao <iamdesvelao@gmail.com>
Co-authored-by: Pablo Martínez <pablomarga@hotmail.com>
Co-authored-by: Alejandro Cuéllar Peinado <alejandro.cuellar@wazuh.com>
Co-authored-by: Toni <34042064+Desvelao@users.noreply.github.com>
Co-authored-by: sortiz <sortiz@owlh.net>
Co-authored-by: sortizowlh <47242022+sortizowlh@users.noreply.github.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Alberto R <alberpilot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate cluster and manager files endpoints
4 participants