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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user