Currently, if K8s Node Allocated Resources and K8s Node Heatmap blocks are on one page, such as the dashboard, the blocks make two separate AJAS calls to the /cloud/k8s/node/all_allocated_resources.

Refactor to reduce it to one call.

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new16.13 KB
new387.57 KB
new110.32 KB

Attaching patch that introduces an Event/Listener model for updating K8s Node Allocated Resources and K8s Node Heatmap block. The option is configurable so that the old updating method is still available to users.

Also refactored K8sNodeAllocatedResourcesBlock to return an initial dataset when the block is rendered. This reduces an extra AJAX call.

baldwinlouie’s picture

Issue summary: View changes
yas’s picture

Status: Needs review » Reviewed & tested by the community

@baldwinlouie

Thank you for the refactoring. I'll merge the patch to 8.x-2.x and 3.x and close this issue as Fixed.

  • yas committed 9800f55 on 3.x authored by baldwinlouie
    Issue #3173655 by baldwinlouie, yas: Refactor the usage of the /clouds/...
yas’s picture

Status: Reviewed & tested by the community » Fixed
baldwinlouie’s picture

StatusFileSize
new16.14 KB

Adding 8.x-2.x patch

  • yas committed 1665c09 on 8.x-2.x authored by baldwinlouie
    Issue #3173655 by baldwinlouie, yas: Refactor the usage of the /clouds/...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.