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

Update check service UI #6093

Merged
merged 26 commits into from
Nov 3, 2023
Merged

Commits on Sep 25, 2023

  1. Create plugin wazuh check updates (#5897)

    * Add wazuh_check_updates plugin
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Manage saved object for plugin configurations
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * New componente UpToDateStatus and improvements
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Current update component and improvements
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * CurrentUpdateDetails improvements and others
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Improvements with unit tests
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Complete public unit tests
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Unit test updatesNotification component
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Backend unit tests
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add current update details to currentUpdateDetails component
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add translation to show details message
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add DismissNotificationCheck component
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Modify styles
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Expose new component
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Update DismissNotificationCheck component
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add getCurrentUser implementation
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fix plugin start types
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fix checks ids
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Delete console.log in component
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fixes in PR
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Modify README
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Delete unused files
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Delete commented code
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Removing unnecessary packages
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Clear available updates value on error
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Change constant name
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Change message on new update
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Change camelCase to kebab-case
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Change plugin name using kebab-case
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add useEffect to component UpToDateStatus
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Improve return errors in routes
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Show update description in lines
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add Logger
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Improve constant name
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Improve check texts and links icons
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fix if statements
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Change folder name in dev.yml using kebab-case
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Update test snapshots
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add I18nProvider wrapper to components
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Unit test for routes and kebab case fixes
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add toast when on get updates error
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Omit username property on GET user preferences
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Improve try catch finally
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Add mock html_id_generator to component unit tests
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fix unit test get-user-preferences
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fix route unit tests port by adding a random port
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Improved user preferences saved object
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Fix toast message
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    * Change port in route unit tests
    
    Signed-off-by: Luciano Gorza <[email protected]>
    
    ---------
    
    Signed-off-by: Luciano Gorza <[email protected]>
    lucianogorza authored Sep 25, 2023
    Configuration menu
    Copy the full SHA
    20e61a7 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. 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
    lucianogorza authored Sep 28, 2023
    Configuration menu
    Copy the full SHA
    04b583a View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Notify user when a new update is available (#5959)

    * New React component WzUpdatesNotification
    
    * Add unit test
    lucianogorza authored Sep 29, 2023
    Configuration menu
    Copy the full SHA
    fab16da View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2023

  1. 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
    lucianogorza authored Oct 9, 2023
    Configuration menu
    Copy the full SHA
    71b5c5d View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. 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 <[email protected]>
    asteriscos and lucianogorza authored Oct 11, 2023
    Configuration menu
    Copy the full SHA
    9761b19 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. 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
    lucianogorza authored Oct 17, 2023
    Configuration menu
    Copy the full SHA
    d0a9302 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. 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 <[email protected]>
    lucianogorza and asteriscos authored Oct 25, 2023
    Configuration menu
    Copy the full SHA
    8d2f1c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. Configuration menu
    Copy the full SHA
    21174d8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a0bd0d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ccb8a3a View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. Configuration menu
    Copy the full SHA
    7a61e69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea87b6e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bcb6282 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fd4d61e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7b800f3 View commit details
    Browse the repository at this point in the history
  6. Fix typo

    lucianogorza committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    2e70f27 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d4c50fe View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. Configuration menu
    Copy the full SHA
    37ffd07 View commit details
    Browse the repository at this point in the history
  2. Improve README file

    lucianogorza committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    d6d6bfd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6158bbb View commit details
    Browse the repository at this point in the history
  4. Improve README file

    lucianogorza committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    5e997dc View commit details
    Browse the repository at this point in the history
  5. Fix Update status column

    lucianogorza committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    aaa82f3 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

  1. Fix unit test

    lucianogorza committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    66fb5ab View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. Fix design implementation (#6070)

    ### Description
    - In the About page delete the API table and leave a React component the
    same as the previous Angular template.
    -  Delete unused components related to the About page.
    - In the UpdatesNotification component only ask for available updates if
    the user doesn't check "Disable update notifications".
    - In API Table handle check updates button errors and show a toast.
     
    ### Issues Resolved
    wazuh/wazuh-dashboard#96
    
    ### Evidence
    
    #### About page
    
    ![image](https:/wazuh/wazuh-dashboard-plugins/assets/103193307/f63ef799-d74f-46b8-87c5-f9d5281c6e12)
    
    #### Bottom bar notification
    
    ![image](https:/wazuh/wazuh-dashboard-plugins/assets/103193307/5904fc9f-595c-4984-b898-c8ae8f555d6e)
    
    #### API Table
    
    ![image](https:/wazuh/wazuh-dashboard-plugins/assets/103193307/56f427c2-4d42-4caf-bdc1-c0ef0f56b9c2)
    
    #### Updates status error message
    
    ![image](https:/wazuh/wazuh-dashboard-plugins/assets/103193307/1fcfcd95-b4d5-460e-990c-799d1a11d294)
    
    #### Check updates button error
    
    ![image](https:/wazuh/wazuh-dashboard-plugins/assets/103193307/b6817794-30b7-49a0-9556-5f589ebde03e)
    
    ### Test
    
    - Go to the About page and compare it to the current About page. They
    must be the same.
    - When the bottom bar notification appears, check `Disable update
    notifications` and click the `Dismiss` button. Reload the page and check
    the network requests. A request for user preferences (ending in `/me`)
    should appear, but there should not be a request for available updates
    (ending in `/updates?checkAvailableUpdates=false`).
    - Go to Settings -> API configuration. Disable the network connection
    and click on `Check Updates` button. A toast should appear with an
    error.
    
    ### Check List
    - [ ] All tests pass
      - [ ] `yarn test:jest`
    - [ ] New functionality includes testing.
    - [ ] New functionality has been documented.
    - [ ] Update [CHANGELOG.md](./../CHANGELOG.md)
    - [ ] Commits are signed per the DCO using --signoff
    asteriscos authored Nov 2, 2023
    Configuration menu
    Copy the full SHA
    36af078 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a9cf99 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2023

  1. Configuration menu
    Copy the full SHA
    cc0cfd9 View commit details
    Browse the repository at this point in the history