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.")