The side menu shows the right count next to every item
The side menu shows how many items each page has, but on current main about 8 entries per cluster stay blank or show the wrong number, for example Volumes, Virtual Machine Networks, the snapshot pages, Storage Classes and Secrets. With the change, every entry shows its count from the first page load, wherever the user lands, and the number matches the list.
Hosts, Volumes, Virtual Machine Networks, Virtual Machine Snapshots, Volume Snapshots, Storage Classes and Secrets now show a count. Before, they were blank until the user opened that page, and some stayed blank even then.
Counts that were wrong are now right: Images said 3 while its list has 2.
The counts appear on the first page load, whatever page the user starts on, and they follow the namespace picked at the top.
Cloud Configuration Templates is the one item still without a count. That is on purpose: counting it would mean loading every ConfigMap in the cluster.
The flow
1
Land on any page
We open Settings straight from a fresh load and look at the main menu items.
Before, Hosts and Volumes had no number and Images said 3. After: 1 host, 9 volumes and 2 images.2
Open the Networks group
We expand Networks in the menu without leaving the page.
Virtual Machine Networks was blank before, even after visiting its list. Now it shows 5, the number of networks in its list.3
Open Backup and Snapshots
Our test cluster has no backups or snapshots, so every right answer here is 0.
Before, Virtual Machine Snapshots and Volume Snapshots were blank. Now all four items show their count.4
Open Advanced
We expand Advanced and scroll the menu to its end.
Storage Classes and Secrets now show 4 and 70. Cloud Configuration Templates stays blank on both sides, which is the agreed exception.5
Check a count against its list
We open Images and count the rows.
The list has 2 images. Before, the menu said 3, because it also counted a system upgrade image that the list doesn't show. Now it says 2.6
Pick one namespace
We switch the namespace filter at the top from All Namespaces to default.
Volumes drops to the 3 volumes in default. Hosts stay at 1, since hosts don't belong to a namespace. Virtual Machine Networks stays at 5, because that list always shows every namespace.
Video (optional)
0:00 Before · 0:34 After
Notes
How we tested: current main and current main with this change, both built and run from this laptop against our test Harvester. Nothing on the cluster was changed.
Our test cluster has no backups or snapshots, so those items show 0. In the detailed review we also added example backups and snapshots in the browser, and each count matched its list.
With one namespace picked, the Images count says 2 while the Images list shows no rows. This is the same before the change and not part of this fix.
We approve this round. The review is drafted but not posted yet, and the PR still waits for a Harvester maintainer.