mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
display bucket quota
This commit is contained in:
parent
f103491912
commit
b1063162b6
|
@ -114,6 +114,7 @@ message Entry {
|
|||
bytes content = 9; // if not empty, the file content
|
||||
|
||||
RemoteEntry remote_entry = 10;
|
||||
int64 quota = 11; // for bucket only. Positive/Negative means enabled/disabled.
|
||||
}
|
||||
|
||||
message FullEntry {
|
||||
|
|
|
@ -114,6 +114,7 @@ message Entry {
|
|||
bytes content = 9; // if not empty, the file content
|
||||
|
||||
RemoteEntry remote_entry = 10;
|
||||
int64 quota = 11; // for bucket only. Positive/Negative means enabled/disabled.
|
||||
}
|
||||
|
||||
message FullEntry {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -63,7 +63,14 @@ func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer i
|
|||
collectionSize = collectionInfo.Size
|
||||
fileCount = collectionInfo.FileCount - collectionInfo.DeleteCount
|
||||
}
|
||||
fmt.Fprintf(writer, " %s\tsize:%d bytes\tfile:%d\treplication: %s\n", entry.Name, collectionSize, fileCount, entry.Attributes.Replication)
|
||||
fmt.Fprintf(writer, " %s\tsize:%d\tfile:%d", entry.Name, collectionSize, fileCount)
|
||||
if entry.Quota > 0 {
|
||||
fmt.Fprintf(writer, "\tquota:%d\tusage:%.2f%%", entry.Quota, float64(collectionSize)*100/float64(entry.Quota))
|
||||
}
|
||||
if entry.Attributes.Replication != "" && entry.Attributes.Replication != "000" {
|
||||
fmt.Fprintf(writer, "\treplication:%s", entry.Attributes.Replication)
|
||||
}
|
||||
fmt.Fprintln(writer)
|
||||
return nil
|
||||
}, "", false, math.MaxUint32)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue