26 lines
1.4 KiB
HTML
26 lines
1.4 KiB
HTML
{{ $scratch := newScratch }}
|
|
{{ $type := .Get "type" }}
|
|
{{ $pathData := findRE "[^/]+.*?" .Page.RelPermalink }}
|
|
{{ $latestTelegrafVersion := replaceRE `\.[0-9]+$` "" .Site.Data.products.telegraf.latest_patches.v1 }}
|
|
{{ $externalPluginLink := print "/telegraf/" (index $pathData 1) "/configure_plugins/external_plugins/" }}
|
|
|
|
{{ range (index .Site.Data.telegraf_plugins $type ) }}
|
|
{{ $pluginTags := delimit .tags " " }}
|
|
{{ $osTags := delimit .os_support " " }}
|
|
{{ $minorVer := replaceRE `v([0-9]+\.[0-9]+)\.[0-9]+$` "$1" .introduced }}
|
|
|
|
<div class="plugin-card filter-item visible{{ if eq $minorVer $latestTelegrafVersion }} new{{ end }}" id="{{ .id }}" data-tags="{{ $type }} {{ lower $pluginTags }} {{ lower $osTags }} {{ if eq $minorVer $latestTelegrafVersion }}new{{ end }} {{ if .deprecated }}deprecated{{ end }} ">
|
|
<div class="info">
|
|
<h3 id="{{ $type }}-{{ .id }}">{{ .name }}</h3>
|
|
<p class="meta">
|
|
Plugin ID: <code>{{ $type }}s.{{ .id }}</code><br/>
|
|
Telegraf {{ if not .deprecated }}{{ .introduced }}+{{ else }}{{ .introduced }} - {{ .deprecated }} <span class="deprecated">Deprecated</span>{{ end }}
|
|
</p>
|
|
<p>{{ .description | markdownify | safeHTML }}</p>
|
|
</div>
|
|
<a class="btn plugin-link" href="{{ if .link }}{{ .link }}{{ else }}/telegraf/v1/{{ $type }}-plugins/{{ .id }}/{{ end }}">
|
|
<span class="hide">View</span>
|
|
</a>
|
|
</div>
|
|
{{ end }}
|