Add size info to bucket list api (#122)

Using madmin.AccountUsageInfo since that api
includes size already.
Also includes integration with UI.
This commit is contained in:
César Nieto
2020-05-18 13:36:18 -07:00
committed by GitHub
parent 35c3b53a23
commit e8491d80cb
8 changed files with 214 additions and 188 deletions

View File

@@ -84,6 +84,7 @@ type MinioAdmin interface {
stopProfiling(ctx context.Context) (io.ReadCloser, error)
serviceTrace(ctx context.Context, allTrace, errTrace bool) <-chan madmin.ServiceTraceInfo
getLogs(ctx context.Context, node string, lineCnt int, logKind string) <-chan madmin.LogInfo
accountUsageInfo(ctx context.Context) (madmin.AccountUsageInfo, error)
// Service Accounts
addServiceAccount(ctx context.Context, policy *iampolicy.Policy) (mauth.Credentials, error)
listServiceAccounts(ctx context.Context) (madmin.ListServiceAccountsResp, error)
@@ -228,6 +229,11 @@ func (ac adminClient) deleteServiceAccount(ctx context.Context, serviceAccount s
return ac.client.DeleteServiceAccount(ctx, serviceAccount)
}
// implements madmin.AccountingUsageInfo()
func (ac adminClient) accountUsageInfo(ctx context.Context) (madmin.AccountUsageInfo, error) {
return ac.client.AccountUsageInfo(ctx)
}
func newMAdminClient(jwt string) (*madmin.AdminClient, error) {
claims, err := auth.JWTAuthenticate(jwt)
if err != nil {