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

Add setting to disable update check service in dashboard #6560

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Mar 27, 2024

Description

This pull request adds setting to disable update check service in dashboard. The new settings is wazuh.updates.disabled which by default is set to false, therefore the app will always try to check for available updates unless it's explicitly set to true.

Issues Resolved

Closes wazuh/wazuh-dashboard#158

Evidence

wazuh.updates.disabled: false

image

wazuh.updates.disabled: true

image

Test

Check there are no check updates features in the app:

  • The initial requests to check for the user configuration and cached updated should not ve made when the setting is true
    • /api/wazuh-check-updates/user-preferences/me
    • /api/wazuh-check-updates/updates
  • In the Server APIs table, these elements must not be rendered:
    • The Version and the Update status columns
    • The Check updates button on top of the table
    • The Disable updates notifications check on top of the table

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

@asteriscos asteriscos self-assigned this Mar 27, 2024
@asteriscos asteriscos marked this pull request as ready for review April 2, 2024 16:57
@yenienserrano yenienserrano self-requested a review April 3, 2024 14:34
@jbiset
Copy link
Member

jbiset commented Apr 3, 2024

Error when clicking Check connection action on table row

image

Copy link
Contributor

github-actions bot commented Apr 3, 2024

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.78% ( 172 / 224 )
Branches 58.65% ( 61 / 104 )
Functions 61.7% ( 29 / 47 )
Lines 76.78% ( 172 / 224 )

@asteriscos
Copy link
Member Author

Error when clicking Check connection action on table row

image

Fixed!

Copy link
Contributor

github-actions bot commented Apr 3, 2024

Wazuh Core plugin code coverage (Jest) test % values
Statements 20.85% ( 186 / 892 )
Branches 17.91% ( 79 / 441 )
Functions 13.79% ( 36 / 261 )
Lines 21.05% ( 183 / 869 )

Copy link
Member

@jbiset jbiset left a comment

Choose a reason for hiding this comment

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

CR: 🟢

Test UI: 🟢

wazuh.updates.disabled: false 🟢

image

wazuh.updates.disabled: true 🟢

image

In the Server APIs table, these elements must not be rendered:

  • The Version and the Update status columns
  • The Check updates button on top of the table
  • The Disable updates notifications check on top of the table

Copy link
Contributor

github-actions bot commented Apr 3, 2024

Main plugin code coverage (Jest) test % values
Statements 12.13% ( 4213 / 34717 )
Branches 8.2% ( 1910 / 23270 )
Functions 11.57% ( 958 / 8275 )
Lines 12.3% ( 4101 / 33319 )

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.

CR: ✅
Test: ✅

Details image

@asteriscos asteriscos merged commit 3e3551f into 4.8.0 Apr 3, 2024
4 checks passed
@asteriscos asteriscos deleted the enhance/disable-update-check-service-in-dashboard-setting-158 branch April 3, 2024 15:59
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.

3 participants