[PR #219] refactor: extract GetResourceUsage extensions, GetFrom helper and ClusterDetailDialog #302

Closed
opened 2026-03-07 19:57:30 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/Corsinvest/cv4pve-admin/pull/219

State: closed
Merged: Yes


Summary

  • Extract ResourceUsage.Get/GetSnapshots static methods into ClusterResourceExtensions.GetResourceUsage() and ClusterClientExtensions.GetResourceUsage() extension methods
  • Add adminService.GetFrom(ClusterNames) helper to replace repeated Where()/Any() pattern across all widgets
  • Simplify widgets: Gauge, GaugeStacked, Grid, NodesStatus, VmsLocked, Size (AutoSnap), Status (Updater), ResourcesEx, Summary
  • Extract ClusterDetailDialog component from Maps Render.razor inline code

Test plan

  • Verify Gauge/GaugeStacked/Grid widgets display correct CPU/Memory/Storage usage
  • Verify snapshot usage shown correctly where enabled
  • Verify Maps widget marker click opens ClusterDetailDialog
  • Verify NodesStatus and VmsLocked widgets work correctly
**Original Pull Request:** https://github.com/Corsinvest/cv4pve-admin/pull/219 **State:** closed **Merged:** Yes --- ## Summary - Extract `ResourceUsage.Get/GetSnapshots` static methods into `ClusterResourceExtensions.GetResourceUsage()` and `ClusterClientExtensions.GetResourceUsage()` extension methods - Add `adminService.GetFrom(ClusterNames)` helper to replace repeated `Where()/Any()` pattern across all widgets - Simplify widgets: `Gauge`, `GaugeStacked`, `Grid`, `NodesStatus`, `VmsLocked`, `Size` (AutoSnap), `Status` (Updater), `ResourcesEx`, `Summary` - Extract `ClusterDetailDialog` component from Maps `Render.razor` inline code ## Test plan - [ ] Verify Gauge/GaugeStacked/Grid widgets display correct CPU/Memory/Storage usage - [ ] Verify snapshot usage shown correctly where enabled - [ ] Verify Maps widget marker click opens ClusterDetailDialog - [ ] Verify NodesStatus and VmsLocked widgets work correctly
kerem 2026-03-07 19:57:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-admin#302
No description provided.