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

Centralize the plugin settings #4501

Merged
merged 45 commits into from
Oct 24, 2022
Merged

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Sep 13, 2022

Description

This PR:

  • Add:
    • Define the plugin setting schema.
      • Adapt the current logic to use the plugin schema
    • Enhance the plugin setting description displayed in the UI and the configuration file.
    • Add description for the plugin settings categories
  • Change PUT /utils/configuration endpoint to support multiple settings
  • Internal
    • Add:
      • New hook to manage the state of form with changes.
    • Change:
      • Refactor the components related to the input form in Settings/Configuration
  • Test
    • Add tests for:
      • Backend endpoints:
        • GET /utils/configuration
        • PUT /utils/configuration
        • GET /utils/logs
    • Default configuration file
    • Methods related to the new plugin setting definition

Closes #4443 #4450

Tests

Manual tests

Scenario: The configuration file is generated with the expected settings.
When the plugin platform starts and there is no plugin configuration file in the expected path
Then a new configuration file is generated and this should contain all the expected settings

Scenario: The configuration through Settings/Configuration section works
When the user go to Settings/Configuration
Then change the input values works as expected

This scenario applies to each setting. Test each setting.

Scenario: The user saves the configuration through Settings/Configuration
Given: the user changes 1 or more settings
When: the user clicks on the Save button
Then: the configuration file should be updated with the changed settings and the frontend should update its values

Scenario: The action toast when saving the configuration can only show one each time.
Given: the user changes 2 or more settings that require the same type of action after updating.
When: the user clicks on the Save button
Then: it should only appear a toast showing the action to do.

This scenario applies to each type of current actions: Execute healtcheck, reload the browser tab and restart the plugin platform

Scenario: Filter settings by category in Settings/Configuration
When the user selects one or more categories from select input on top of the page.
Then the settings of the selected category/ies should be displayed.

Scenario: User search a setting in Settings/Configuration
When the user selects introduces a query in the search bar.
Then the setting/s that match the query are displayed.

Scenario: Update one setting from Settings/Configuration
When the user changes a setting value and clicks on the Save button
Then the setting should be updated in the configuration file and the frontend

Scenario: Update 2 or more settings from Settings/Configuration
When the user changes 2 or more setting values and clicks on the Save button
Then the settings should be updated in the configuration file and the frontend

Scenario: Update one setting through API request PUT /utils/configuration
When the user does a request to update some setting using some request tool: cURL, postman, etc...
Then the setting should be updated in the configuration file

Scenario: Update 2 or more settings through API request PUT /utils/configuration
When the user does a request to update 2 or more settings using some request tool: cURL, postman, etc...
Then the settings should be updated in the configuration file

Scenario: Plugin setting category description appears in the configuration file
Given an environment without a plugin configuration file
When the user starts the plugin platform and the default configuration file is generated
Then each plugin category has the description on the configuration file

Scenario: Plugin setting category description appears in the Settings/Configuration
When the user navigates to Settings/Configuration
Then each plugin category has the description


To manually test the configuration endpoint here are 2 scripts to update different configuration values.

centralize-conf.zip

To use it, first unzip the files in the same folder and allow both executing the file as a program. Afterwards you can run the manual-test-centralize.sh script.

You can also use wz-api-conf.sh script with custom configuration parameters, like:

\- s setting_name
\- v setting_value

eg.
./wz-api-conf.sh -s disabled_roles -v [\"disabled\"]

Output

$ ./manual-test-centralize.sh 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   398  100   398    0     0    839      0 --:--:-- --:--:-- --:--:--   837
{"timeout":25000}
{"data":{"requiresRunningHealthCheck":false,"requiresReloadingBrowserTab":false,"requiresRestartingPluginPlatform":false,"updatedConfiguration":{"timeout":25000}}}  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   398  100   398    0     0    914      0 --:--:-- --:--:-- --:--:--   914
{"extensions.aws":true}
{"data":{"requiresRunningHealthCheck":false,"requiresReloadingBrowserTab":false,"requiresRestartingPluginPlatform":false,"updatedConfiguration":{"extensions.aws":true}}}  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   398  100   398    0     0    855      0 --:--:-- --:--:-- --:--:--   855
{"alerts.sample.prefix":"prefix_test_"}
{"data":{"requiresRunningHealthCheck":true,"requiresReloadingBrowserTab":false,"requiresRestartingPluginPlatform":false,"updatedConfiguration":{"alerts.sample.prefix":"prefix_test_"}}}  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   398  100   398    0     0    904      0 --:--:-- --:--:-- --:--:--   902
{"ip.ignore":["test*\"]}
{"statusCode":400,"error":"Bad Request","message":"Invalid request payload JSON format"}  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   398  100   398    0     0    898      0 --:--:-- --:--:-- --:--:--   898
{"logs.level":"debug"}
{"data":{"requiresRunningHealthCheck":false,"requiresReloadingBrowserTab":false,"requiresRestartingPluginPlatform":true,"updatedConfiguration":{"logs.level":"debug"}}}  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   398  100   398    0     0    910      0 --:--:-- --:--:-- --:--:--   910
{"fake.config":"test fake config"}
{"statusCode":400,"error":"Bad Request","message":"[request body.fake.config]: definition for this key is missing"}

Automatic tests

  • server/routes/wazuh-utils/wazuh-utils.test.ts
  • public/components/common/form/hooks.test.tsx
  • public/components/common/form/index.test.tsx
  • server/lib/initial-wazuh-config.test.ts
  • common/services/settings.test.ts

Run these tests with:

yarn test:jest <filepath>

Run all PR tests

yarn test:jest server/routes/wazuh-utils/wazuh-utils.test.ts public/components/common/form/hooks.test.tsx public/components/common/form/index.test.tsx server/lib/initial-wazuh-config.test.ts common/services/settings.test.ts

Create the plugin setting schema
Define the current plugin settings
Remove refactored code
Use dynamically the definition of the plugin settings
Add new hooks to manage when a input value or form has changed
Add new inputs components
Refactor Header, BottomBar, Configuration components
Remove deprecated files
Changed the endpoint that updating the plugin setting to support
  multiple settings at the same time
Refactor the getConfiguration service. Split the logic to:
  - Read the file and transform to JSON
  - Obfuscate the password key of the host configuration
@Desvelao Desvelao changed the title Feat/centralize plugin settings Centralize the plugin settings Sep 13, 2022
@Desvelao Desvelao added the type/enhancement Enhancement issue label Sep 13, 2022
@Desvelao Desvelao linked an issue Sep 13, 2022 that may be closed by this pull request
13 tasks
@Desvelao Desvelao linked an issue Sep 13, 2022 that may be closed by this pull request
2 tasks
@Desvelao
Copy link
Member Author

Changes

  • Add tests for:
    • useForm hook
    • /utils/* API endpoints
    • default configuration file
    • InputForm component

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

Code coverage (Jest) % values
Statements 7.65% ( 2780 / 36360 )
Branches 3.41% ( 954 / 28003 )
Functions 5.78% ( 517 / 8937 )
Lines 7.72% ( 2685 / 34800 )

Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Mayons95
Copy link
Contributor

Mayons95 commented Oct 20, 2022

Test Review:
In the second test, we found that it accepted negative and decimal values on all the numbers input fields

Screenshot from 2022-10-20 16-17-06

Screenshot from 2022-10-20 16-16-37

@Mayons95
Copy link
Contributor

Mayons95 commented Oct 20, 2022

Test Review:

Screencast.from.20-10-22.16.25.05.webm
Screencast.from.20-10-22.16.24.27.webm
Screencast.from.20-10-22.16.23.34.webm
Screencast.from.20-10-22.16.22.16.webm
Screencast.from.20-10-22.16.17.33.webm
Screencast.from.20-10-22.16.12.18.webm
Screencast.from.24-10-22.11.10.34.webm

@Desvelao
Copy link
Member Author

Desvelao commented Oct 21, 2022

Test Review: In the second test, we found that it accepted negative and decimal values on all the numbers input fields

Screenshot from 2022-10-20 16-17-06

Screenshot from 2022-10-20 16-16-37

The branch of this pull request has no validation in the inputs of the Settings/Configuration. So the negative numbers should be solved in #4503. Anyways, the decimal number should not be allowed for some settings. I will add these validations to the related pull request. #4503.

EDIT: Added in e5a28ea

Copy link
Contributor

@Mayons95 Mayons95 left a comment

Choose a reason for hiding this comment

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

LGTM
TR: ✔️

Evidence in my previous comments.

@asteriscos asteriscos merged commit 430fe82 into 4.4-7.10 Oct 24, 2022
@asteriscos asteriscos deleted the feat/centralize-plugin-settings branch October 24, 2022 15:43
@github-actions
Copy link
Contributor

The backport to 4.4-7.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-7.16 4.4-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.4-7.16
# Create a new branch
git switch --create backport-4501-to-4.4-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 430fe8299b755b53b29535f0cce98563e94ae5cc
# Push it to GitHub
git push --set-upstream origin backport-4501-to-4.4-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-7.16

Then, create a pull request where the base branch is 4.4-7.16 and the compare/head branch is backport-4501-to-4.4-7.16.

@github-actions
Copy link
Contributor

The backport to 4.4-2.3-wzd failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-2.3-wzd 4.4-2.3-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.4-2.3-wzd
# Create a new branch
git switch --create backport-4501-to-4.4-2.3-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 430fe8299b755b53b29535f0cce98563e94ae5cc
# Push it to GitHub
git push --set-upstream origin backport-4501-to-4.4-2.3-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-2.3-wzd

Then, create a pull request where the base branch is 4.4-2.3-wzd and the compare/head branch is backport-4501-to-4.4-2.3-wzd.

asteriscos pushed a commit that referenced this pull request Oct 24, 2022
* feat(settings): centralize the plugin settings

Create the plugin setting schema
Define the current plugin settings
Remove refactored code

* feat(settings): add setting services and replaced the references to constants

* feat(settings): refactor the content of the default configuration file

Use dynamically the definition of the plugin settings

* feat(inputs): create new inputs components

Add new hooks to manage when a input value or form has changed
Add new inputs components

* feat(configuration): refactor the form of Settings/Configuration

Refactor Header, BottomBar, Configuration components
Remove deprecated files

* feat(settings): support updating multiple setting at the same time

Changed the endpoint that updating the plugin setting to support
  multiple settings at the same time
Refactor the getConfiguration service. Split the logic to:
  - Read the file and transform to JSON
  - Obfuscate the password key of the host configuration

* clean: remove not used code

* fix: fixed category name in `Settings/Configuration`

* fix(settings): fixed error due to missing service

* fix(settings): refactor the form and inputs of `Settings/Configuration` to control the global state of the form

* fix: add value transformation for the form inputs and output of fields changed

* fix(settings): renamed properties related to transform the value of the input

* feat(settings): add description to the plugin setting definition properties

* fix(settings): fix getConfiguration service when the configuration file has no `hosts` entry

* fix(settings): Fixed error when do changes of the `useForm` hook an rename methods of this

* tests(settings): add test related to the plugin settings and its configuration from the UI

* feat(settings): rename plugin setting options of type select to match its type

* feat(settings): add plugin settings services and enhance the description of the plugin settings in default configuration file and UI

* tests(input-form): update tests of InputForm component

* test(configuration-file): add tests of the default configuration file

* feat(settings): remove `extensions.mitre` plugin setting

* feat(settings): add documentation to some setting services and test some of them

* fix: fixed documentation of setting service

* doc(settings): move the documentation of the plugin setting properties

* fix(settings): rename some plugin setting properties because of request changes

- Rename plugin setting properties:
  - `default` to `defaultValue`
  - `defaultHidden` to `defaultValueIfNotSet`
  - `configurableFile` to `isConfigurableFromFile`
  - configurableUI` to `isConfigurableFromUI`
  - `requireHealthCheck` to `requiresRunningHealthCheck`
  - `requireReload` to `requiresReloadingBrowserTab`
  - `requireRestart` to `requiresRestartingPluginPlatform`
- Fix tests

* tests: fix tests of InputForm component

* fix: response properties when saving the configuration

* fix(settings): fix displaying toast to run the healthcheck when saving the configuration

* Added category sorting + description + docs link

* Added settings sorting within their category

* Fixed constant types definition

* Checks if localCompare exists validation

* fix(settings): fixed plugin setting description doesn't display the minimum number value when it is falsy (0)

* fix(settings): fix setting type of `wazuh.monitoring.replicas` and limit the valid number for the number input

* feat(settins): add plugin settings category description

* fix(settings): fix a problem comparing the initial and current value for the plugin settings of the `number` type

* fix(settings): fix typo in setting description

* fix(tests): format tables of the tests

* Fix small typo

* fix(settings): fix a typo in a toast related to modify the plugin settings from UI

* Changed Custom Branding documentation link

* Delete unused imports

* Update constants.ts

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 430fe82)
asteriscos pushed a commit that referenced this pull request Oct 24, 2022
* feat(settings): centralize the plugin settings

Create the plugin setting schema
Define the current plugin settings
Remove refactored code

* feat(settings): add setting services and replaced the references to constants

* feat(settings): refactor the content of the default configuration file

Use dynamically the definition of the plugin settings

* feat(inputs): create new inputs components

Add new hooks to manage when a input value or form has changed
Add new inputs components

* feat(configuration): refactor the form of Settings/Configuration

Refactor Header, BottomBar, Configuration components
Remove deprecated files

* feat(settings): support updating multiple setting at the same time

Changed the endpoint that updating the plugin setting to support
  multiple settings at the same time
Refactor the getConfiguration service. Split the logic to:
  - Read the file and transform to JSON
  - Obfuscate the password key of the host configuration

* clean: remove not used code

* fix: fixed category name in `Settings/Configuration`

* fix(settings): fixed error due to missing service

* fix(settings): refactor the form and inputs of `Settings/Configuration` to control the global state of the form

* fix: add value transformation for the form inputs and output of fields changed

* fix(settings): renamed properties related to transform the value of the input

* feat(settings): add description to the plugin setting definition properties

* fix(settings): fix getConfiguration service when the configuration file has no `hosts` entry

* fix(settings): Fixed error when do changes of the `useForm` hook an rename methods of this

* tests(settings): add test related to the plugin settings and its configuration from the UI

* feat(settings): rename plugin setting options of type select to match its type

* feat(settings): add plugin settings services and enhance the description of the plugin settings in default configuration file and UI

* tests(input-form): update tests of InputForm component

* test(configuration-file): add tests of the default configuration file

* feat(settings): remove `extensions.mitre` plugin setting

* feat(settings): add documentation to some setting services and test some of them

* fix: fixed documentation of setting service

* doc(settings): move the documentation of the plugin setting properties

* fix(settings): rename some plugin setting properties because of request changes

- Rename plugin setting properties:
  - `default` to `defaultValue`
  - `defaultHidden` to `defaultValueIfNotSet`
  - `configurableFile` to `isConfigurableFromFile`
  - configurableUI` to `isConfigurableFromUI`
  - `requireHealthCheck` to `requiresRunningHealthCheck`
  - `requireReload` to `requiresReloadingBrowserTab`
  - `requireRestart` to `requiresRestartingPluginPlatform`
- Fix tests

* tests: fix tests of InputForm component

* fix: response properties when saving the configuration

* fix(settings): fix displaying toast to run the healthcheck when saving the configuration

* Added category sorting + description + docs link

* Added settings sorting within their category

* Fixed constant types definition

* Checks if localCompare exists validation

* fix(settings): fixed plugin setting description doesn't display the minimum number value when it is falsy (0)

* fix(settings): fix setting type of `wazuh.monitoring.replicas` and limit the valid number for the number input

* feat(settins): add plugin settings category description

* fix(settings): fix a problem comparing the initial and current value for the plugin settings of the `number` type

* fix(settings): fix typo in setting description

* fix(tests): format tables of the tests

* Fix small typo

* fix(settings): fix a typo in a toast related to modify the plugin settings from UI

* Changed Custom Branding documentation link

* Delete unused imports

* Update constants.ts

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 430fe82)
Desvelao added a commit that referenced this pull request Oct 25, 2022
* Centralize the plugin settings (#4501)

* feat(settings): centralize the plugin settings

Create the plugin setting schema
Define the current plugin settings
Remove refactored code

* feat(settings): add setting services and replaced the references to constants

* feat(settings): refactor the content of the default configuration file

Use dynamically the definition of the plugin settings

* feat(inputs): create new inputs components

Add new hooks to manage when a input value or form has changed
Add new inputs components

* feat(configuration): refactor the form of Settings/Configuration

Refactor Header, BottomBar, Configuration components
Remove deprecated files

* feat(settings): support updating multiple setting at the same time

Changed the endpoint that updating the plugin setting to support
  multiple settings at the same time
Refactor the getConfiguration service. Split the logic to:
  - Read the file and transform to JSON
  - Obfuscate the password key of the host configuration

* clean: remove not used code

* fix: fixed category name in `Settings/Configuration`

* fix(settings): fixed error due to missing service

* fix(settings): refactor the form and inputs of `Settings/Configuration` to control the global state of the form

* fix: add value transformation for the form inputs and output of fields changed

* fix(settings): renamed properties related to transform the value of the input

* feat(settings): add description to the plugin setting definition properties

* fix(settings): fix getConfiguration service when the configuration file has no `hosts` entry

* fix(settings): Fixed error when do changes of the `useForm` hook an rename methods of this

* tests(settings): add test related to the plugin settings and its configuration from the UI

* feat(settings): rename plugin setting options of type select to match its type

* feat(settings): add plugin settings services and enhance the description of the plugin settings in default configuration file and UI

* tests(input-form): update tests of InputForm component

* test(configuration-file): add tests of the default configuration file

* feat(settings): remove `extensions.mitre` plugin setting

* feat(settings): add documentation to some setting services and test some of them

* fix: fixed documentation of setting service

* doc(settings): move the documentation of the plugin setting properties

* fix(settings): rename some plugin setting properties because of request changes

- Rename plugin setting properties:
  - `default` to `defaultValue`
  - `defaultHidden` to `defaultValueIfNotSet`
  - `configurableFile` to `isConfigurableFromFile`
  - configurableUI` to `isConfigurableFromUI`
  - `requireHealthCheck` to `requiresRunningHealthCheck`
  - `requireReload` to `requiresReloadingBrowserTab`
  - `requireRestart` to `requiresRestartingPluginPlatform`
- Fix tests

* tests: fix tests of InputForm component

* fix: response properties when saving the configuration

* fix(settings): fix displaying toast to run the healthcheck when saving the configuration

* Added category sorting + description + docs link

* Added settings sorting within their category

* Fixed constant types definition

* Checks if localCompare exists validation

* fix(settings): fixed plugin setting description doesn't display the minimum number value when it is falsy (0)

* fix(settings): fix setting type of `wazuh.monitoring.replicas` and limit the valid number for the number input

* feat(settins): add plugin settings category description

* fix(settings): fix a problem comparing the initial and current value for the plugin settings of the `number` type

* fix(settings): fix typo in setting description

* fix(tests): format tables of the tests

* Fix small typo

* fix(settings): fix a typo in a toast related to modify the plugin settings from UI

* Changed Custom Branding documentation link

* Delete unused imports

* Update constants.ts

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 430fe82)

* Fix unit test

* Fix unit test

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
Desvelao added a commit that referenced this pull request Oct 25, 2022
* Centralize the plugin settings (#4501)

* feat(settings): centralize the plugin settings

Create the plugin setting schema
Define the current plugin settings
Remove refactored code

* feat(settings): add setting services and replaced the references to constants

* feat(settings): refactor the content of the default configuration file

Use dynamically the definition of the plugin settings

* feat(inputs): create new inputs components

Add new hooks to manage when a input value or form has changed
Add new inputs components

* feat(configuration): refactor the form of Settings/Configuration

Refactor Header, BottomBar, Configuration components
Remove deprecated files

* feat(settings): support updating multiple setting at the same time

Changed the endpoint that updating the plugin setting to support
  multiple settings at the same time
Refactor the getConfiguration service. Split the logic to:
  - Read the file and transform to JSON
  - Obfuscate the password key of the host configuration

* clean: remove not used code

* fix: fixed category name in `Settings/Configuration`

* fix(settings): fixed error due to missing service

* fix(settings): refactor the form and inputs of `Settings/Configuration` to control the global state of the form

* fix: add value transformation for the form inputs and output of fields changed

* fix(settings): renamed properties related to transform the value of the input

* feat(settings): add description to the plugin setting definition properties

* fix(settings): fix getConfiguration service when the configuration file has no `hosts` entry

* fix(settings): Fixed error when do changes of the `useForm` hook an rename methods of this

* tests(settings): add test related to the plugin settings and its configuration from the UI

* feat(settings): rename plugin setting options of type select to match its type

* feat(settings): add plugin settings services and enhance the description of the plugin settings in default configuration file and UI

* tests(input-form): update tests of InputForm component

* test(configuration-file): add tests of the default configuration file

* feat(settings): remove `extensions.mitre` plugin setting

* feat(settings): add documentation to some setting services and test some of them

* fix: fixed documentation of setting service

* doc(settings): move the documentation of the plugin setting properties

* fix(settings): rename some plugin setting properties because of request changes

- Rename plugin setting properties:
  - `default` to `defaultValue`
  - `defaultHidden` to `defaultValueIfNotSet`
  - `configurableFile` to `isConfigurableFromFile`
  - configurableUI` to `isConfigurableFromUI`
  - `requireHealthCheck` to `requiresRunningHealthCheck`
  - `requireReload` to `requiresReloadingBrowserTab`
  - `requireRestart` to `requiresRestartingPluginPlatform`
- Fix tests

* tests: fix tests of InputForm component

* fix: response properties when saving the configuration

* fix(settings): fix displaying toast to run the healthcheck when saving the configuration

* Added category sorting + description + docs link

* Added settings sorting within their category

* Fixed constant types definition

* Checks if localCompare exists validation

* fix(settings): fixed plugin setting description doesn't display the minimum number value when it is falsy (0)

* fix(settings): fix setting type of `wazuh.monitoring.replicas` and limit the valid number for the number input

* feat(settins): add plugin settings category description

* fix(settings): fix a problem comparing the initial and current value for the plugin settings of the `number` type

* fix(settings): fix typo in setting description

* fix(tests): format tables of the tests

* Fix small typo

* fix(settings): fix a typo in a toast related to modify the plugin settings from UI

* Changed Custom Branding documentation link

* Delete unused imports

* Update constants.ts

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 430fe82)

* fix: fix some problems related to the conflict resolution and remove unused security factories

* fix(test): fix tests related to the conflict resolution

* fix(test): fix a failed test due to missing dependency

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
@Mayons95 Mayons95 mentioned this pull request Dec 7, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
None yet
5 participants