fix: replicate remove show partial operations if any (#4418)
This commit is contained in:
@@ -19,7 +19,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
@@ -82,7 +81,13 @@ func (i srRemoveStatus) String() string {
|
||||
if i.RemoveAll {
|
||||
return console.Colorize("UserMessage", "All site(s) were removed successfully")
|
||||
}
|
||||
return console.Colorize("UserMessage", fmt.Sprintf("Following site(s) %s were removed successfully", strings.Join(i.sites, ", ")))
|
||||
if i.ReplicateRemoveStatus.Status == madmin.ReplicateRemoveStatusSuccess {
|
||||
return console.Colorize("UserMessage", fmt.Sprintf("Following site(s) %s were removed successfully", i.sites))
|
||||
}
|
||||
if len(i.sites) == 1 {
|
||||
return console.Colorize("UserMessage", fmt.Sprintf("Following site %s was removed partially, some operations failed:\nERROR: '%s'", i.sites, i.ReplicateRemoveStatus.ErrDetail))
|
||||
}
|
||||
return console.Colorize("UserMessage", fmt.Sprintf("Following site(s) %s were removed partially, some operations failed: \nERROR: '%s'", i.sites, i.ReplicateRemoveStatus.ErrDetail))
|
||||
}
|
||||
|
||||
func checkAdminReplicateRemoveSyntax(ctx *cli.Context) {
|
||||
|
||||
Reference in New Issue
Block a user