-
Notifications
You must be signed in to change notification settings - Fork 186
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
Check for updates when user logs in #6001
Merged
lucianogorza
merged 11 commits into
enhancement/84-update-check-service-ui
from
enhancement/109-check-for-updates-when-user-logins
Oct 17, 2023
Merged
Check for updates when user logs in #6001
lucianogorza
merged 11 commits into
enhancement/84-update-check-service-ui
from
enhancement/109-check-for-updates-when-user-logins
Oct 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
Test
After user logins there is a network request "/api/wazuh-check-updates/updates?checkAvailableUpdates=true"After refresh the page there is a network request "/api/wazuh-check-updates/updates?checkAvailableUpdates=false" |
Test
After user logins there is a network request "/api/wazuh-check-updates/updates?checkAvailableUpdates=true"After refresh the page there is a network request "/api/wazuh-check-updates/updates?checkAvailableUpdates=false" |
Tostti
approved these changes
Oct 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST:✔️
CR:✔️
LGTM
asteriscos
reviewed
Oct 17, 2023
plugins/wazuh-check-updates/public/components/apis-update-status/table/columns/index.tsx
Outdated
Show resolved
Hide resolved
Tostti
approved these changes
Oct 17, 2023
Tostti
changed the title
Check for updates when user logins
Check for updates when user logs in
Oct 17, 2023
|
asteriscos
approved these changes
Oct 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: ✔️
Test: ✔️
lucianogorza
merged commit Oct 17, 2023
d0a9302
into
enhancement/84-update-check-service-ui
2 checks passed
lucianogorza
deleted the
enhancement/109-check-for-updates-when-user-logins
branch
October 17, 2023 14:36
asteriscos
added a commit
that referenced
this pull request
Nov 3, 2023
* Create plugin wazuh check updates (#5897) * Add wazuh_check_updates plugin Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Manage saved object for plugin configurations Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * New componente UpToDateStatus and improvements Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Current update component and improvements Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * CurrentUpdateDetails improvements and others Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Improvements with unit tests Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Complete public unit tests Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Unit test updatesNotification component Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Backend unit tests Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add current update details to currentUpdateDetails component Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add translation to show details message Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add DismissNotificationCheck component Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Modify styles Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Expose new component Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Update DismissNotificationCheck component Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add getCurrentUser implementation Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fix plugin start types Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fix checks ids Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Delete console.log in component Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fixes in PR Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Modify README Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Delete unused files Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Delete commented code Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Removing unnecessary packages Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Clear available updates value on error Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Change constant name Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Change message on new update Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Change camelCase to kebab-case Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Change plugin name using kebab-case Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add useEffect to component UpToDateStatus Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Improve return errors in routes Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Show update description in lines Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add Logger Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Improve constant name Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Improve check texts and links icons Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fix if statements Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Change folder name in dev.yml using kebab-case Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Update test snapshots Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add I18nProvider wrapper to components Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Unit test for routes and kebab case fixes Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add toast when on get updates error Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Omit username property on GET user preferences Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Improve try catch finally Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Add mock html_id_generator to component unit tests Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fix unit test get-user-preferences Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fix route unit tests port by adding a random port Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Improved user preferences saved object Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Fix toast message Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Change port in route unit tests Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> --------- Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> * Enhancement/88 integrate plugin and update about page (#5939) * Integrate plugin wazuh-check-updates * Replace the Angular template for a React component * Add wazuh-check-updates plugin to the manifest main plugin * Add CurrentUpdateDetails component * Improve About page and unit tests * Add information to Change Log * Make the About page accessible to any user * Notify user when a new update is available (#5959) * New React component WzUpdatesNotification * Add unit test * Get and show available updates for each api (#5984) * Add APIs table version status * Add available updates columns * Add changes to show one mayor, one minor and one patch update per API * Improve messages * Improve notification * Change camelCase for snake_case in API response * Fix server unit tests * Fix frontend unit tests * Fix main plugin about page unit tests * Apis table components unit tests * Update CHANGELOG.md * Update unit test snapshot * Update CHANGELOG * Fix get updates status * Fix release notes url with current * Improve toast id on Apis table * ApisUpdateStatus: Show error callout only the first time * Create new plugin wazuh core (#5985) * Add wazuh-core plugin * Add API Wazuh Core services * Wazuh Core Plugin API service POC * Remove files not used * Integrate Wazuh Core plugin with Wazuh Check Updates plugin * Delete imposter endpoint * Add field 'update_check' to saved object mapping * Delete comment * Delete getUpdates at cron job start --------- Co-authored-by: Luciano Gorza <lucianogorza@gmail.com> * Check for updates when user logs in (#6001) * Delete cron job * Delete settings managment * Remove 'Wazuh' word from UI * Remove unnecesary constants * Expose and consume security from Wazuh Core * Fix unit test types * Delete 'Wazuh' from title * Set sessionStorage with checkUpdates * Fix snapshot unit test * Improve default messages and colors in update status column * Move constant definition to inside the component * Add check updates columns to APIs table and other fixes (#6058) * Add check updates columns to APIs table and other fixes * Update notification link to the API configuration page * Fix link to API configuration page * Update plataform version in package.json for all plugins * Update test snapshots --------- Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com> * Update WZ_HOME in README file * Change href for onClick in bottom bar link * Handle check updates endpoint error * Make about page the same as angular template * Update about page unit tests * Delete unused componets from Wazuh Check Updates plugin * Replace availableUpdates hook with getAvailableUpdates function * Add unit tests for new components * Fix typo * Fix unit test html id generator * Show error message in Updates status column * Improve README file * Improve table and columns layout * Improve README file * Fix Update status column * Fix unit test --------- Signed-off-by: Luciano Gorza <lucianogorza@gmail.com> Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Every time the user logins, the frontend should make a request to the Wazuh API to check for new updates and display notifications if applicable.
Additionally, to determine which user is trying to get and set preferences, a security factory was added to the Wazhu Core plugin.
Issues Resolved
Evidence
After login
After refresh the page
After close the notification
Test
Check List
yarn test:jest