package app import ( "fmt" "github.com/seaweedfs/seaweedfs/weed/admin/dash" ) templ ClusterCollections(data dash.ClusterCollectionsData) {

Cluster Collections

Total Collections
{fmt.Sprintf("%d", data.TotalCollections)}
Total Volumes
{fmt.Sprintf("%d", data.TotalVolumes)}
Total Files
{fmt.Sprintf("%d", data.TotalFiles)}
Total Storage Size
{formatBytes(data.TotalSize)}
Collection Details
if len(data.Collections) > 0 {
for _, collection := range data.Collections { }
Collection Name Volumes Files Size Disk Types Actions
{collection.Name}
{fmt.Sprintf("%d", collection.VolumeCount)}
{fmt.Sprintf("%d", collection.FileCount)}
{formatBytes(collection.TotalSize)}
for i, diskType := range collection.DiskTypes { if i > 0 { } {diskType} } if len(collection.DiskTypes) == 0 { Unknown }
} else {
No Collections Found

No collections are currently configured in the cluster.

}
Last updated: {data.LastUpdated.Format("2006-01-02 15:04:05")}
} func getDiskTypeColor(diskType string) string { switch diskType { case "ssd": return "primary" case "hdd", "": return "secondary" default: return "info" } } func formatDiskTypes(diskTypes []string) string { if len(diskTypes) == 0 { return "Unknown" } if len(diskTypes) == 1 { return diskTypes[0] } // For multiple disk types, join with comma result := "" for i, diskType := range diskTypes { if i > 0 { result += ", " } result += diskType } return result }