hawtio / hawtio-online

Hawtio on Kubernetes/OpenShift
Apache License 2.0
23 stars 25 forks source link

Solution for paginating the Discover page (#496) #525

Closed phantomjinx closed 1 month ago

phantomjinx commented 2 months ago

https://github.com/user-attachments/assets/5a85e823-08c2-4505-a660-44e08a887018

phantomjinx commented 2 months ago

Will do some videos to show exactly how it works ... to follow.

tadayosi commented 2 months ago

Specifically, what's your solution to #496, how do you think the issue is solved with it?

phantomjinx commented 2 months ago

It's a bit tough to review such big changes effectively. Could you outline what's the core idea of the solution and where is the most important part of the changes?

Yeah, no problem. As I say, I'll do a video and talk through the changes

phantomjinx commented 1 month ago

Specifically, what's your solution to #496, how do you think the issue is solved with it?

Changes

Specifics

  1. When a namespace is scanned, all the pods that contain a jolokia connection are indexed by name;
  2. Using a given namespace limit (default 3), the first 'page' of pods are fetched and watcher connections established. Therefore, for each namespace containing jolokia pods, only the first '3' pods are ever being watched at any 1 time;
  3. When the user click 'next' or 'prev', the watchers for the current set of pods are destroyed and a new set is created for the 'next' set of 3. Therefore, regardless of the project size the UI only displays a set limited number;
  4. A preference is provided, should the user wish to increase the display from 3;
  5. Both filter and sort have been refactored to perform those functions down at the k8s level rather than just the UI level. This makes sense since the filter then applies to all pods in the namespace rather than just those displayed in the current page of the namespace in the UI.