package app import ( "fmt" "net/url" "strings" "time" "github.com/seaweedfs/seaweedfs/weed/admin/dash" ) templ S3ObjectInspector(data dash.S3ObjectInspectorData) {
| Version | Size | Modified | ETag / Checksum | Object Lock | Chunks |
|---|---|---|---|---|---|
{ v.VersionId }
if v.IsLatest {
latest
}
if v.IsDeleteMarker {
delete marker
}
{ v.Path }
|
{ formatBytes(int64(v.Size)) } | { formatS3ObjectTime(v.ModifiedAt) } |
if v.ETag != "" {
{ v.ETag }{ strings.TrimPrefix(strings.ToUpper(v.ChecksumAlgorithm), "X-AMZ-CHECKSUM-") }:
}
{ v.ChecksumValue } |
if v.ObjectLockMode != "" {
{ v.ObjectLockMode }
}
if v.RetainUntil != nil {
until { formatS3ObjectTime(*v.RetainUntil) }
}
if v.LegalHold != "" {
legal hold { v.LegalHold }
}
if v.WormEnforcedAt != nil {
WORM since { formatS3ObjectTime(*v.WormEnforcedAt) }
}
|
if v.InlineBytes > 0 {
inline ({ formatBytes(int64(v.InlineBytes)) })
}
if v.RemoteStorage != "" {
remote: { v.RemoteStorage }
}
for _, c := range v.Chunks {
{ c.FileId }
if c.IsManifest {
manifest
}
{ formatBytes(int64(c.Size)) }
|
No chunks stored on volumes.
} else {| Volume | Kind | Copies / Shards | Servers | Status |
|---|---|---|---|---|
| if link := s3ObjectVolumeLink(vol); link != "" { { fmt.Sprintf("%d", vol.VolumeId) } } else { { fmt.Sprintf("%d", vol.VolumeId) } } | { vol.Kind } |
switch vol.Kind {
case "replicated":
{ fmt.Sprintf("%d / %d copies", vol.CopiesPresent, vol.CopiesExpected) }
if vol.ReadOnly {
read-only
}
case "ec":
{ fmt.Sprintf("%d / %d shards", vol.EcShardsPresent, vol.EcTotalShards) }
if len(vol.EcMissingShards) > 0 {
missing { fmt.Sprint(vol.EcMissingShards) }
}
}
|
{ strings.Join(vol.Servers, ", ") } | if vol.Healthy { ok } else { { s3ObjectVolumeProblem(vol) } } |