Skip to content

Commit a6f53a2

Browse files
authored
Merge pull request #6117 from srebhan/telegraf_templates
Adapt templates to generator tool definitions
2 parents b32c482 + afd475a commit a6f53a2

File tree

5 files changed

+33
-19
lines changed

5 files changed

+33
-19
lines changed

telegraf-build/templates/aggregator_plugin.tmpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ menu:
66
name: {{.Name}}
77
identifier: aggregator-{{.ID}}
88
tags: [{{.Name}}, "aggregator-plugins", "configuration"{{range .Tags}}, "{{.}}"{{end}}]
9-
{{if .Introduced}}introduced: "{{.Introduced}}"{{end}}
10-
{{if .Deprecated}}deprecated: "{{.Deprecated}}"{{end}}
11-
{{if .Removal}}removal: "{{.Removal}}"{{end}}
12-
{{if .OS}}os_support: "{{.OS}}"{{end}}
9+
introduced: "{{.Introduced}}"
10+
{{- with .Deprecated}}
11+
deprecated: {{.}}
12+
{{- end}}
13+
{{- with .Removal}}
14+
removal: {{.}}
15+
{{- end}}
16+
os_support: "{{.OSTags | join ", "}}"
1317
related:
1418
- /telegraf/v1/configure_plugins/
1519
- {{.URL}}, {{.Name}} Plugin Source

telegraf-build/templates/input_plugin.tmpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ menu:
66
name: {{.Name}}
77
identifier: input-{{.ID}}
88
tags: [{{.Name}}, "input-plugins", "configuration"{{range .Tags}}, "{{.}}"{{end}}]
9-
{{if .Introduced}}introduced: "{{.Introduced}}"{{end}}
10-
{{if .Deprecated}}deprecated: "{{.Deprecated}}"{{end}}
11-
{{if .Removal}}removal: "{{.Removal}}"{{end}}
12-
{{if .OS}}os_support: "{{.OS}}"{{end}}
9+
introduced: "{{.Introduced}}"
10+
{{- with .Deprecated}}
11+
deprecated: {{.}}
12+
{{- end}}
13+
{{- with .Removal}}
14+
removal: {{.}}
15+
{{- end}}
16+
os_support: "{{.OSTags | join ", "}}"
1317
related:
1418
- /telegraf/v1/configure_plugins/
1519
- {{.URL}}, {{.Name}} Plugin Source

telegraf-build/templates/output_plugin.tmpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ menu:
66
name: {{.Name}}
77
identifier: output-{{.ID}}
88
tags: [{{.Name}}, "output-plugins", "configuration"{{range .Tags}}, "{{.}}"{{end}}]
9-
{{if .Introduced}}introduced: "{{.Introduced}}"{{end}}
10-
{{if .Deprecated}}deprecated: "{{.Deprecated}}"{{end}}
11-
{{if .Removal}}removal: "{{.Removal}}"{{end}}
12-
{{if .OS}}os_support: "{{.OS}}"{{end}}
9+
introduced: "{{.Introduced}}"
10+
{{- with .Deprecated}}
11+
deprecated: {{.}}
12+
{{- end}}
13+
{{- with .Removal}}
14+
removal: {{.}}
15+
{{- end}}
16+
os_support: "{{.OSTags | join ", "}}"
1317
related:
1418
- /telegraf/v1/configure_plugins/
1519
- {{.URL}}, {{.Name}} Plugin Source

telegraf-build/templates/plugin_list_entry.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@
99
{{- with .Removal }}
1010
removal: {{ . }}
1111
{{- end }}
12-
{{ with .OS }}
13-
os_support: {{ . }}
14-
{{- end }}
12+
os_support: [{{ .OSTags | join ", " }}]
1513
tags: [{{ .Tags | join ", " }}]

telegraf-build/templates/processor_plugin.tmpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ menu:
66
name: {{.Name}}
77
identifier: processor-{{.ID}}
88
tags: [{{.Name}}, "processor-plugins", "configuration"{{range .Tags}}, "{{.}}"{{end}}]
9-
{{if .Introduced}}introduced: "{{.Introduced}}"{{end}}
10-
{{if .Deprecated}}deprecated: "{{.Deprecated}}"{{end}}
11-
{{if .Removal}}removal: "{{.Removal}}"{{end}}
12-
{{if .OS}}os_support: "{{.OS}}"{{end}}
9+
introduced: "{{.Introduced}}"
10+
{{- with .Deprecated}}
11+
deprecated: {{.}}
12+
{{- end}}
13+
{{- with .Removal}}
14+
removal: {{.}}
15+
{{- end}}
16+
os_support: "{{.OSTags | join ", "}}"
1317
related:
1418
- /telegraf/v1/configure_plugins/
1519
- {{.URL}}, {{.Name}} Plugin Source

0 commit comments

Comments
 (0)