package app import ( "fmt" "github.com/seaweedfs/seaweedfs/weed/admin/dash" "github.com/seaweedfs/seaweedfs/weed/util" ) templ CollectionDetails(data dash.CollectionDetailsData) {

Collection Details: {data.CollectionName}

Regular Volumes

{fmt.Sprintf("%d", data.TotalVolumes)}

Traditional volumes
EC Volumes

{fmt.Sprintf("%d", data.TotalEcVolumes)}

Erasure coded volumes
Total Files

{fmt.Sprintf("%d", data.TotalFiles)}

Files stored
Total Size (Logical)

{util.BytesToHumanReadable(uint64(data.TotalSize))}

Data stored (regular volumes only)
Showing {fmt.Sprintf("%d", (data.Page-1)*data.PageSize + 1)} to {fmt.Sprintf("%d", func() int { end := data.Page * data.PageSize totalItems := data.TotalVolumes + data.TotalEcVolumes if end > totalItems { return totalItems } return end }())} of {fmt.Sprintf("%d", data.TotalVolumes + data.TotalEcVolumes)} items
per page
// Display regular volumes for _, volume := range data.RegularVolumes { } // Display EC volumes for _, ecVolume := range data.EcVolumes { }
Volume ID if data.SortBy == "volume_id" { if data.SortOrder == "asc" { } else { } } else { } Type if data.SortBy == "type" { if data.SortOrder == "asc" { } else { } } else { } Logical Size / Shard Count Files Status Actions
{fmt.Sprintf("%d", volume.Id)} Regular {util.BytesToHumanReadable(volume.Size)} {fmt.Sprintf("%d", volume.FileCount)} if volume.ReadOnly { Read Only } else { Read/Write }
{fmt.Sprintf("%d", ecVolume.VolumeID)} EC {fmt.Sprintf("%d/14", ecVolume.TotalShards)} - if ecVolume.IsComplete { Complete } else { Missing {fmt.Sprintf("%d", len(ecVolume.MissingShards))} shards }
if !ecVolume.IsComplete { }
if data.TotalPages > 1 { } }