fix: handle 'default' collection filter in cluster volumes page

- Update matchesCollection to recognize 'default' as filter for empty collection
- Remove incorrect conversion of 'default' to empty string in handlers
- Fixes issue where ?collection=default would show all collections instead of just default collection
This commit is contained in:
chrislu
2025-11-01 13:08:29 -07:00
parent fb46a8a61f
commit c56a0a0ebd
2 changed files with 3 additions and 9 deletions

View File

@@ -16,8 +16,8 @@ import (
// matchesCollection checks if a volume/EC volume collection matches the filter collection.
// Handles the special case where empty collection ("") represents the "default" collection.
func matchesCollection(volumeCollection, filterCollection string) bool {
// Both empty means default collection matches default filter
if volumeCollection == "" && filterCollection == "" {
// Handle special case where "default" filter matches empty collection
if filterCollection == "default" && volumeCollection == "" {
return true
}
// Direct string match for named collections