cloudoperators / juno

Monorepo for the Juno modular frontend framework, apps, design system and component library
http://cloudoperators.github.io/juno/
Apache License 2.0
4 stars 0 forks source link

[TASK] (supernova): Remove Alerts Worker and Introduce React Query #628

Open ArtieReus opened 5 days ago

ArtieReus commented 5 days ago

Description

Replace the alerts worker with React Query while maintaining the existing functionality without modifying the store and other components. This refactor is a preparatory step for a future rearchitecture and will enable fetching with filters in a subsequent phase.

Steps

  1. Remove Alerts Worker

    • Remove the current implementation of the alerts worker used for fetching data.
  2. Introduce React Query

    • Use React Query to fetch alerts data.
    • Ensure the fetching logic retains the same interval as the alerts worker.
  3. Migrate Alert Worker Logic to React Query

    • Transfer the logic from the worker function into the React Query fetching promise.
    • Ensure the fetched data structure matches the existing structure used in the application.
  4. Save Fetching Results

    • Save the results fetched by React Query into the Zustand store.
    • Maintain compatibility with the existing store structure and ensure no changes are required in other components.

Acceptance Criteria

Related to

Notes