convert tabs to spaces in all commands (#4275)
This commit is contained in:
@@ -98,13 +98,13 @@ FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
EXAMPLES:
|
||||
1. Set a new remote replication target "targetbucket" in region "us-west-1" on https://minio.siteb.example.com for bucket 'sourcebucket'.
|
||||
1. Set a new replication target "targetbucket" in region "us-west-1" on https://minio.siteb.example.com for
|
||||
bucket 'sourcebucket'.
|
||||
{{.Prompt}} {{.HelpName}} sitea/sourcebucket https://foobar:foo12345@minio.siteb.example.com/targetbucket \
|
||||
--service "replication" --region "us-west-1"
|
||||
|
||||
2. Set a new remote replication target 'targetbucket' in region "us-west-1" on https://minio.siteb.example.com for
|
||||
bucket 'sourcebucket' with bandwidth set to 2 gigabits per second. Enable synchronous replication to the target
|
||||
and perform health check of target every 100 seconds
|
||||
2. Set a new synchronous replication target 'targetbucket' in region "us-west-1" on https://minio.siteb.example.com for
|
||||
bucket 'sourcebucket' with bandwidth set to 2 gigabits per second.
|
||||
{{.Prompt}} {{.HelpName}} sitea/sourcebucket https://foobar:foo12345@minio.siteb.example.com/targetbucket \
|
||||
--service "replication" --region "us-west-1 --bandwidth "2G" --sync
|
||||
`,
|
||||
|
||||
@@ -94,14 +94,14 @@ FLAGS:
|
||||
EXAMPLES:
|
||||
1. Edit credentials for existing remote target with arn where a remote target has been configured between sourcebucket on sitea to targetbucket on siteb.
|
||||
{{.DisableHistory}}
|
||||
{{.Prompt}} {{.HelpName}} sitea/sourcebucket \
|
||||
{{.Prompt}} {{.HelpName}} sitea/sourcebucket \
|
||||
https://foobar:newpassword@minio.siteb.example.com/targetbucket \
|
||||
--arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1"
|
||||
--arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1"
|
||||
{{.EnableHistory}}
|
||||
|
||||
2. Edit remote target for sourceBucket on sitea with specified ARN to disable proxying and enable synchronous replication
|
||||
{{.Prompt}} {{.HelpName}} sitea/sourcebucket --sync "enable" --proxy "disable"
|
||||
--arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1"
|
||||
{{.Prompt}} {{.HelpName}} sitea/sourcebucket --sync "enable" --proxy "disable"
|
||||
--arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1"
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -95,17 +95,17 @@ FLAGS:
|
||||
{{end}}
|
||||
|
||||
EXAMPLES:
|
||||
1. Display overall site replication status:
|
||||
{{.Prompt}} {{.HelpName}} minio1
|
||||
1. Display overall site replication status:
|
||||
{{.Prompt}} {{.HelpName}} minio1
|
||||
|
||||
2. Display site replication status of buckets across sites
|
||||
{{.Prompt}} {{.HelpName}} minio1 --buckets
|
||||
2. Display site replication status of buckets across sites
|
||||
{{.Prompt}} {{.HelpName}} minio1 --buckets
|
||||
|
||||
3. Drill down and view site replication status of bucket "bucket"
|
||||
{{.Prompt}} {{.HelpName}} minio1 --bucket bucket
|
||||
3. Drill down and view site replication status of bucket "bucket"
|
||||
{{.Prompt}} {{.HelpName}} minio1 --bucket bucket
|
||||
|
||||
4. Drill down and view site replication status of user "foo"
|
||||
{{.Prompt}} {{.HelpName}} minio1 --user foo
|
||||
4. Drill down and view site replication status of user "foo"
|
||||
{{.Prompt}} {{.HelpName}} minio1 --user foo
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ var adminTraceFlags = []cli.Flag{
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "call",
|
||||
Usage: "trace only matching Call types (values: `s3`, `internal`, `storage`, `os`, `scanner`, `decommission`, `healing`)",
|
||||
Usage: "trace only matching call types (e.g. `s3`, `internal`, `storage`, `os`, `scanner`, `decommission`, `healing`)",
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "response-threshold",
|
||||
|
||||
@@ -128,7 +128,7 @@ func isAliasURLDir(ctx context.Context, aliasURL string, keys map[string][]prefi
|
||||
// *) If alias format is specified, return false
|
||||
// *) If alias/bucket is specified, return true
|
||||
// *) If alias/bucket/prefix, check if prefix has
|
||||
// has a trailing slash.
|
||||
// has a trailing slash.
|
||||
pathURL := filepath.ToSlash(aliasURL)
|
||||
fields := strings.Split(pathURL, "/")
|
||||
switch len(fields) {
|
||||
|
||||
+4
-4
@@ -87,7 +87,7 @@ EXAMPLES:
|
||||
{{.Prompt}} {{.HelpName}} --interval 30 myminio
|
||||
|
||||
4. Stop pinging when error count > 20.
|
||||
{{.Prompt}} {{.HelpName}} --error-count 20 myminio
|
||||
{{.Prompt}} {{.HelpName}} --error-count 20 myminio
|
||||
`,
|
||||
}
|
||||
|
||||
@@ -355,9 +355,9 @@ func extractHostPort(hostAddr string) (string, string, error) {
|
||||
|
||||
addr = u.Host
|
||||
// At this point, addr can be one of the following form:
|
||||
// ":9000"
|
||||
// "localhost:9000"
|
||||
// "localhost" <- in this case, we check for scheme
|
||||
// ":9000"
|
||||
// "localhost:9000"
|
||||
// "localhost" <- in this case, we check for scheme
|
||||
|
||||
host, port, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
|
||||
@@ -71,23 +71,23 @@ var replicateEditCmd = cli.Command{
|
||||
Flags: append(globalFlags, replicateEditFlags...),
|
||||
CustomHelpTemplate: `NAME:
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}} TARGET
|
||||
|
||||
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
EXAMPLES:
|
||||
1. Change priority of rule with rule ID "bsibgh8t874dnjst8hkg" on bucket "mybucket" for alias "myminio".
|
||||
{{.Prompt}} {{.HelpName}} myminio/mybucket --id "bsibgh8t874dnjst8hkg" --priority 3
|
||||
|
||||
|
||||
2. Disable a replication configuration rule with rule ID "bsibgh8t874dnjst8hkg" on target myminio/bucket
|
||||
{{.Prompt}} {{.HelpName}} myminio/mybucket --id "bsibgh8t874dnjst8hkg" --state disable
|
||||
|
||||
3. Set tags and storage class on a replication configuration with rule ID "kMYD.491" on target myminio/bucket/prefix.
|
||||
{{.Prompt}} {{.HelpName}} myminio/mybucket --id "kMYD.491" --tags "key1=value1&key2=value2" \
|
||||
--storage-class "STANDARD" --priority 2
|
||||
--storage-class "STANDARD" --priority 2
|
||||
4. Clear tags for replication configuration rule with ID "kMYD.491" on a target myminio/bucket.
|
||||
{{.Prompt}} {{.HelpName}} myminio/mybucket --id "kMYD.491" --tags ""
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ var replicateExportCmd = cli.Command{
|
||||
Flags: globalFlags,
|
||||
CustomHelpTemplate: `NAME:
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}} TARGET
|
||||
|
||||
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
|
||||
@@ -38,10 +38,10 @@ var replicateImportCmd = cli.Command{
|
||||
Flags: globalFlags,
|
||||
CustomHelpTemplate: `NAME:
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}} TARGET
|
||||
|
||||
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
|
||||
+2
-2
@@ -47,10 +47,10 @@ var replicateListCmd = cli.Command{
|
||||
Flags: append(globalFlags, replicateListFlags...),
|
||||
CustomHelpTemplate: `NAME:
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}} TARGET
|
||||
|
||||
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
|
||||
+2
-2
@@ -53,10 +53,10 @@ var replicateRemoveCmd = cli.Command{
|
||||
Flags: append(globalFlags, replicateRemoveFlags...),
|
||||
CustomHelpTemplate: `NAME:
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}} TARGET
|
||||
|
||||
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
|
||||
@@ -49,7 +49,7 @@ FLAGS:
|
||||
{{end}}
|
||||
EXAMPLES:
|
||||
1. Get server side replication metrics for bucket "mybucket" for alias "myminio".
|
||||
{{.Prompt}} {{.HelpName}} myminio/mybucket
|
||||
{{.Prompt}} {{.HelpName}} myminio/mybucket
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -87,7 +87,7 @@ var sqlCmd = cli.Command{
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}} [FLAGS] TARGET [TARGET...]
|
||||
{{if .VisibleFlags}}
|
||||
{{if .VisibleFlags}}
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}{{end}}
|
||||
@@ -106,23 +106,23 @@ EXAMPLES:
|
||||
|
||||
3. Run a query on an encrypted object with customer provided keys.
|
||||
{{.Prompt}} {{.HelpName}} --encrypt-key "myminio/iot-devices=32byteslongsecretkeymustbegiven1" \
|
||||
--query "select count(s.power) from S3Object s" myminio/iot-devices/power-ratio-encrypted.csv
|
||||
--query "select count(s.power) from S3Object s" myminio/iot-devices/power-ratio-encrypted.csv
|
||||
|
||||
4. Run a query on an object on MinIO in gzip format using ; as field delimiter,
|
||||
newline as record delimiter and file header to be used
|
||||
{{.Prompt}} {{.HelpName}} --compression GZIP --csv-input "rd=\n,fh=USE,fd=;" \
|
||||
--query "select count(s.power) from S3Object" myminio/iot-devices/power-ratio.csv.gz
|
||||
--query "select count(s.power) from S3Object" myminio/iot-devices/power-ratio.csv.gz
|
||||
|
||||
5. Run a query on an object on MinIO in gzip format using ; as field delimiter,
|
||||
newline as record delimiter and file header to be used
|
||||
{{.Prompt}} {{.HelpName}} --compression GZIP --csv-input "rd=\n,fh=USE,fd=;" \
|
||||
--json-output "rd=\n\n" --query "select * from S3Object" myminio/iot-devices/data.csv
|
||||
--json-output "rd=\n\n" --query "select * from S3Object" myminio/iot-devices/data.csv
|
||||
|
||||
6. Run same query as in 5., but specify csv output headers. If --csv-output-headers is
|
||||
specified as "", first row of csv is interpreted as header
|
||||
{{.Prompt}} {{.HelpName}} --compression GZIP --csv-input "rd=\n,fh=USE,fd=;" \
|
||||
--csv-output "rd=\n" --csv-output-header "device_id,uptime,lat,lon" \
|
||||
--query "select * from S3Object" myminio/iot-devices/data.csv
|
||||
--csv-output "rd=\n" --csv-output-header "device_id,uptime,lat,lon" \
|
||||
--query "select * from S3Object" myminio/iot-devices/data.csv
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ FLAGS:
|
||||
{{end}}
|
||||
EXAMPLES:
|
||||
1. Show current status of MinIO logs with alias 'play', whether
|
||||
it is uploading to SUBNET or not
|
||||
it is uploading to SUBNET or not
|
||||
{{.Prompt}} {{.HelpName}} play
|
||||
`,
|
||||
}
|
||||
|
||||
+6
-3
@@ -53,7 +53,8 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.content += msg
|
||||
m.viewport.SetContent(wordwrap.String(m.content, m.viewport.Width-2))
|
||||
case tea.KeyMsg:
|
||||
if k := msg.String(); k == "ctrl+c" || k == "q" || k == "esc" {
|
||||
switch msg.String() {
|
||||
case "ctrl+c", "q", "esc":
|
||||
return m, tea.Quit
|
||||
}
|
||||
case tea.WindowSizeMsg:
|
||||
@@ -93,12 +94,14 @@ func (m model) View() string {
|
||||
}
|
||||
|
||||
func (m model) headerView() string {
|
||||
return ""
|
||||
info := " (q)uit/esc"
|
||||
line := strings.Repeat("─", max(0, m.viewport.Width-lipgloss.Width(info)))
|
||||
return lipgloss.JoinHorizontal(lipgloss.Center, line, info)
|
||||
}
|
||||
|
||||
func (m model) footerView() string {
|
||||
percent := percentStyle.Render(fmt.Sprintf("%d%%", int(m.viewport.ScrollPercent()*100)))
|
||||
info := fmt.Sprintf(" (q)uit | %s", percent)
|
||||
info := fmt.Sprintf(" %s", percent)
|
||||
line := strings.Repeat("─", max(0, m.viewport.Width-lipgloss.Width(info)))
|
||||
return lipgloss.JoinHorizontal(lipgloss.Center, line, info)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user