Fix admin help messages and docs (#2884)

This commit is contained in:
Harshavardhana
2019-09-06 10:07:30 -07:00
committed by GitHub
parent 22ab93da0f
commit 5fc35b6682
17 changed files with 127 additions and 68 deletions
+11 -11
View File
@@ -34,7 +34,7 @@ const logTimeFormat string = "15:04:05 MST 01/02/2006"
var adminConsoleFlags = []cli.Flag{
cli.IntFlag{
Name: "limit, l",
Usage: "Show last n log entries",
Usage: "show last n log entries",
Value: 10,
},
}
@@ -47,20 +47,20 @@ var adminConsoleCmd = cli.Command{
Flags: append(adminConsoleFlags, globalFlags...),
HideHelpCommand: true,
CustomHelpTemplate: `NAME:
{{.HelpName}} - {{.Usage}}
{{.HelpName}} - {{.Usage}}
USAGE:
{{.HelpName}} [FLAGS] TARGET
{{.HelpName}} [FLAGS] TARGET [NODENAME]
FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Show console logs for a MinIO server with alias 'play'
$ {{.HelpName}} play
1. Show console logs for a MinIO server with alias 'play'
$ {{.HelpName}} play
2. Show last 5 log entries for node 'node1' on MinIO server with alias 'cluster1'
$ {{.HelpName}} cluster1 node1 --limit 5
2. Show last 5 log entries for node 'node1' on MinIO server with alias 'cluster1'
$ {{.HelpName}} --limit 5 cluster1 node1
`,
}
@@ -144,7 +144,7 @@ func mainAdminConsole(ctx *cli.Context) error {
fatalIf(errInvalidArgument().Trace(ctx.Args()...), "please set a proper limit, for example: '--limit 5' to display last 5 logs, omit this flag to display all available logs")
}
}
// Create a new Minio Admin Client
// Create a new MinIO Admin Client
client, err := newAdminClient(aliasedURL)
if err != nil {
fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.")
+1 -1
View File
@@ -36,7 +36,7 @@ FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Disable group 'allcents':
1. Disable group 'allcents'.
$ {{.HelpName}} myminio allcents
`,
}
+1 -2
View File
@@ -42,9 +42,8 @@ FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Enable group 'allcents':
1. Enable group 'allcents'.
$ {{.HelpName}} myminio allcents
`,
}
+1 -1
View File
@@ -39,7 +39,7 @@ FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Get info on group 'allcents':
1. Get info on group 'allcents'.
$ {{.HelpName}} myminio allcents
`,
}
+2 -2
View File
@@ -33,13 +33,13 @@ var adminGroupListCmd = cli.Command{
{{.HelpName}} - {{.Usage}}
USAGE:
{{.HelpName}} TARGET GROUPNAME
{{.HelpName}} TARGET
FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. List groups:
1. List all groups.
$ {{.HelpName}} myminio
`,
}
+4 -3
View File
@@ -34,15 +34,16 @@ var adminGroupRemoveCmd = cli.Command{
{{.HelpName}} - {{.Usage}}
USAGE:
{{.HelpName}} TARGET GROUPNAME [MEMBERS...]
{{.HelpName}} TARGET GROUPNAME [USERNAMES...]
FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Remove members 'tencent' and 'fivecent' from group 'allcents':
1. Remove members 'tencent' and 'fivecent' from group 'allcents'.
$ {{.HelpName}} myminio allcents tencent fivecent
2. Remove group 'allcents':
2. Remove group 'allcents'.
$ {{.HelpName}} myminio allcents
`,
}
+1 -1
View File
@@ -81,7 +81,7 @@ FLAGS:
{{end}}
SCAN MODES:
normal (default): Heal objects which are missing on one or more disks.
deep : Heal objects which are missing on one or more disks. Also heal objects with silent data corruption.
deep : Heal objects which are missing or with silent data corruption on one or more disks.
EXAMPLES:
1. To format newly replaced disks in a MinIO server with alias 'myminio'
+1 -2
View File
@@ -53,8 +53,7 @@ FLAGS:
{{end}}
EXAMPLES:
1. Get server CPU information of the 'play' MinIO server.
$ {{.HelpName}} play/
$ {{.HelpName}} play/
`,
}
+1 -2
View File
@@ -54,8 +54,7 @@ FLAGS:
{{end}}
EXAMPLES:
1. Get server CPU information of the 'play' MinIO server.
$ {{.HelpName}} play/
$ {{.HelpName}} play/
`,
}
+1 -2
View File
@@ -49,8 +49,7 @@ FLAGS:
{{end}}
EXAMPLES:
1. Get server information of the 'play' MinIO server.
$ {{.HelpName}} play/
$ {{.HelpName}} play/
`,
}
+7 -7
View File
@@ -50,7 +50,7 @@ var adminTraceFlags = []cli.Flag{
var adminTraceCmd = cli.Command{
Name: "trace",
Usage: "show http trace for minio server",
Usage: "show http trace for MinIO server",
Action: mainAdminTrace,
Before: setGlobalsFromContext,
Flags: append(adminTraceFlags, globalFlags...),
@@ -65,12 +65,12 @@ FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Show console trace for a Minio server with alias 'play'
$ {{.HelpName}} play -v -a
1. Show console trace for a MinIO server with alias 'play'
$ {{.HelpName}} -v -a play
2. Show trace only for failed requests for a Minio server with alias 'myminio'
$ {{.HelpName}} myminio -v -e
`,
2. Show trace only for failed requests for a MinIO server with alias 'myminio'
$ {{.HelpName}} -v -e myminio
`,
}
const timeFormat = "15:04:05.000"
@@ -111,7 +111,7 @@ func mainAdminTrace(ctx *cli.Context) error {
for _, c := range colors {
console.SetColor(fmt.Sprintf("Node%d", c), color.New(c))
}
// Create a new Minio Admin Client
// Create a new MinIO Admin Client
client, err := newAdminClient(aliasedURL)
if err != nil {
fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.")
+6
View File
@@ -39,6 +39,12 @@ var adminUserAddCmd = cli.Command{
USAGE:
{{.HelpName}} TARGET ACCESSKEY SECRETKEY
ACCESSKEY:
Also called as username.
SECRETKEY:
Also called as password.
FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
+1 -1
View File
@@ -33,7 +33,7 @@ var adminUserInfoCmd = cli.Command{
{{.HelpName}} - {{.Usage}}
USAGE:
{{.HelpName}} TARGET ACCESSKEY
{{.HelpName}} TARGET USERNAME
FLAGS:
{{range .VisibleFlags}}{{.}}
+1 -1
View File
@@ -97,7 +97,7 @@ EXAMPLES:
1. Run a query on a set of objects recursively on AWS S3.
$ {{.HelpName}} --recursive --query "select * from S3Object" s3/personalbucket/my-large-csvs/
2. Run a query on an object on Minio.
2. Run a query on an object on MinIO.
$ {{.HelpName}} --query "select count(s.power) from S3Object" myminio/iot-devices/power-ratio.csv
3. Run a query on an encrypted object with customer provided keys.