Closed abdheshnayak closed 1 month ago
This pull request improves the cluster status fetching mechanism by introducing a new hook useClusterStatusV3
and updating the environment resources view to use this new implementation. The changes aim to enhance performance and provide more accurate cluster status information.
sequenceDiagram
actor User
participant UI
participant useClusterStatusV3
participant API
User->>UI: View Environment Resources
UI->>useClusterStatusV3: Fetch Cluster Status
useClusterStatusV3->>API: getClusterStatus(name)
API-->>useClusterStatusV3: Return lastOnlineAt
useClusterStatusV3-->>UI: Update Cluster Status
UI-->>User: Display Updated Status
Change | Details | Files |
---|---|---|
Introduced a new cluster status fetching mechanism |
|
src/apps/console/hooks/use-cluster-status-v3.tsx src/apps/console/server/gql/queries/cluster-queries.ts gql-queries-generator/doc/queries.graphql src/apps/console/hooks/use-cluster-status.tsx |
Updated environment resources view to use the new cluster status mechanism |
|
src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx |
Integrated the new ClusterStatusProvider into the application |
|
src/apps/console/root.tsx |
Summary by Sourcery
Improve cluster status fetching by introducing a new hook
useClusterStatusV3
and aClusterStatusProvider
for better performance and real-time updates. This replaces the previous version and enhances the overall efficiency of cluster status management.New Features:
useClusterStatusV3
to manage cluster status with improved performance and real-time updates.Enhancements:
useClusterStatusV3
.ClusterStatusProvider
to wrap components and provide cluster status context.