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

EC Shards

if data.FilterCollection != "" {
Collection: {data.FilterCollection} Clear Filter
}
Total Shards

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

EC Volumes

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

Complete Volumes

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

All 14 shards
Incomplete Volumes

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

Missing shards
if data.ShowCollectionColumn { } if data.ShowDataCenterColumn { } if data.ShowRackColumn { } for _, shard := range data.EcShards { if data.ShowCollectionColumn { } if data.ShowDataCenterColumn { } if data.ShowRackColumn { } }
Volume ID if data.SortBy == "volume_id" { if data.SortOrder == "asc" { } else { } } else { } Shard ID if data.SortBy == "shard_id" { if data.SortOrder == "asc" { } else { } } else { } Collection if data.SortBy == "collection" { if data.SortOrder == "asc" { } else { } } else { } Server if data.SortBy == "server" { if data.SortOrder == "asc" { } else { } } else { } Data Center if data.SortBy == "datacenter" { if data.SortOrder == "asc" { } else { } } else { } Rack if data.SortBy == "rack" { if data.SortOrder == "asc" { } else { } } else { } Status Actions
{fmt.Sprintf("%d", shard.VolumeID)} {fmt.Sprintf("%02d", shard.ShardID)} if shard.Collection != "" { {shard.Collection} } else { default } {shard.Server} {shard.DataCenter} {shard.Rack} if shard.IsComplete { Complete } else { Missing {fmt.Sprintf("%d", len(shard.MissingShards))} shards }
if !shard.IsComplete { }
if data.TotalPages > 1 { } }