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

Object Store Buckets

Total Buckets
{fmt.Sprintf("%d", data.TotalBuckets)}
Total Storage
{formatBytes(data.TotalSize)}
Active Buckets
{fmt.Sprintf("%d", countActiveBuckets(data.Buckets))}
Last Updated
{data.LastUpdated.Format("15:04:05")}
Object Store Buckets
for _, bucket := range data.Buckets { } if len(data.Buckets) == 0 { }
Name Created Objects Size Status Actions
{bucket.Name} {bucket.CreatedAt.Format("2006-01-02 15:04")} {fmt.Sprintf("%d", bucket.ObjectCount)} {formatBytes(bucket.Size)} {bucket.Status}
No Object Store buckets found

Create your first bucket to get started with S3 storage.

Last updated: {data.LastUpdated.Format("2006-01-02 15:04:05")}
} // Helper functions for template func getBucketStatusColor(status string) string { switch status { case "active": return "success" case "error": return "danger" case "warning": return "warning" default: return "secondary" } } func countActiveBuckets(buckets []dash.S3Bucket) int { count := 0 for _, bucket := range buckets { if bucket.Status == "active" { count++ } } return count }