mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
no 'replicate status' without replication config (#15233)
'replicate status' shouldn't be displaying historic values unless replication config is present on the relevant bucket.
This commit is contained in:
parent
2518af5f9e
commit
3af6073576
@ -202,6 +202,12 @@ func (api objectAPIHandlers) GetBucketReplicationMetricsHandler(w http.ResponseW
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
if _, _, err := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket); err != nil {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
var usageInfo BucketUsageInfo
|
||||
dataUsageInfo, err := loadDataUsageFromBackend(ctx, objectAPI)
|
||||
if err == nil && !dataUsageInfo.LastUpdate.IsZero() {
|
||||
|
Loading…
Reference in New Issue
Block a user