mirror of
https://github.com/minio/minio.git
synced 2025-04-01 10:13:42 -04: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)
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, _, err := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket); err != nil {
|
||||||
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var usageInfo BucketUsageInfo
|
var usageInfo BucketUsageInfo
|
||||||
dataUsageInfo, err := loadDataUsageFromBackend(ctx, objectAPI)
|
dataUsageInfo, err := loadDataUsageFromBackend(ctx, objectAPI)
|
||||||
if err == nil && !dataUsageInfo.LastUpdate.IsZero() {
|
if err == nil && !dataUsageInfo.LastUpdate.IsZero() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user