mirror of
https://github.com/minio/minio.git
synced 2025-11-25 12:06:10 -05:00
Enhance config restore to carry previous set content as well (#8483)
This PR brings support for `history` list to list in the following agreed format ``` ~ mc admin config history list -n 2 myminio RestoreId: df0ebb1e-69b0-4043-b9dd-ab54508f2897 Date: Mon, 04 Nov 2019 17:27:27 GMT region name="us-east-1" state="on" region name="us-east-1" state="on" region name="us-east-1" state="on" region name="us-east-1" state="on" RestoreId: ecc6873a-0ed3-41f9-b03e-a2a1bab48b5f Date: Mon, 04 Nov 2019 17:28:23 GMT region name=us-east-1 state=off ``` This PR also moves the help templating and coloring to fully `mc` side instead than `madmin` API.
This commit is contained in:
committed by
kannappanr
parent
26ed9e81b1
commit
1e457dda7e
@@ -88,11 +88,11 @@ const (
|
||||
KvSeparator = `=`
|
||||
KvSpaceSeparator = ` `
|
||||
KvComment = `#`
|
||||
KvNewline = "\n"
|
||||
KvDoubleQuote = `"`
|
||||
KvSingleQuote = `'`
|
||||
|
||||
KvNewline = "\n"
|
||||
Default = `_`
|
||||
Default = `_`
|
||||
)
|
||||
|
||||
// This function is needed, to trim off single or double quotes, creeping into the values.
|
||||
@@ -140,8 +140,8 @@ func convertTargets(s string, targets Targets) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// parseSubSysTarget - parse sub-system target
|
||||
func parseSubSysTarget(buf []byte) (Targets, error) {
|
||||
// ParseSubSysTarget - parse sub-system target
|
||||
func ParseSubSysTarget(buf []byte) (Targets, error) {
|
||||
targets := make(map[string]map[string]KVS)
|
||||
bio := bufio.NewScanner(bytes.NewReader(buf))
|
||||
for bio.Scan() {
|
||||
|
||||
Reference in New Issue
Block a user