{{- /* Collector component table shortcode - renders complete HTML table from data files Usage: {{< collector-component-rows type="receiver" >}} {{< collector-component-rows type="extension" subtype="encoding" >}} {{< collector-component-rows type="extension" renderFootnotes="false" >}} Parameters: - type: Component type (receiver, processor, exporter, connector, extension) (required) - subtype: For extensions, filter by subtype (encoding, observer, storage) (optional) - renderFootnotes: Whether to render footnotes after table (default: "true") - distributionsFootnote: Footnote number for Distributions column (default: "1") - stabilityFootnote: Footnote number for Stability column (for extension, default: "2") - signalsFootnote: Footnote number for signal columns (for receiver/processor/exporter, default: "2") The shortcode reads from data/collector/{type}s.yml and uses i18n strings for headers and footnotes. */ -}} {{- $componentType := .Get "type" -}} {{- $dataFile := printf "%ss" $componentType -}} {{- $data := index hugo.Data.collector $dataFile -}} {{- if not $data -}} {{- errorf "No data found for component type '%s' (expected data/collector/%s.yml)" $componentType $dataFile -}} {{- end -}} {{- /* Get column headers from i18n */ -}} {{- $colName := i18n "collector_component_table_header_name" -}} {{- $colDistributions := i18n "collector_component_table_header_distributions" -}} {{- $colTraces := i18n "collector_component_table_header_traces" -}} {{- $colMetrics := i18n "collector_component_table_header_metrics" -}} {{- $colLogs := i18n "collector_component_table_header_logs" -}} {{- $colStability := i18n "collector_component_table_header_stability" -}} {{- /* Get optional subtype filter */ -}} {{- $subtype := .Get "subtype" -}} {{- /* Footnote numbers */ -}} {{- $distributionsFootnote := .Get "distributionsFootnote" | default "1" -}} {{- $stabilityFootnote := .Get "stabilityFootnote" | default "2" -}} {{- $signalsFootnote := .Get "signalsFootnote" | default "2" -}} {{- /* Generate footnote HTML - no id on sup to avoid duplicates, all tables share same footnote targets */ -}} {{- $distFootnoteHTML := printf "%s" $distributionsFootnote $distributionsFootnote -}} {{- $stabilityFootnoteHTML := printf "%s" $stabilityFootnote $stabilityFootnote -}} {{- $signalsFootnoteHTML := printf "%s" $signalsFootnote $signalsFootnote -}}
| {{ $colName }} | {{ $colDistributions }}{{ $distFootnoteHTML | safeHTML }} | {{- if eq $componentType "extension" }}{{ $colStability }}{{ $stabilityFootnoteHTML | safeHTML }} | {{- else if ne $componentType "connector" }}{{ $colTraces }}{{ $signalsFootnoteHTML | safeHTML }} | {{ $colMetrics }}{{ $signalsFootnoteHTML | safeHTML }} | {{ $colLogs }}{{ $signalsFootnoteHTML | safeHTML }} | {{- end }}
|---|---|---|---|---|---|
| {{ $displayName }}{{- if $unmaintained }} ⚠️{{ end }} | {{ $distString }} | {{- if eq $componentType "extension" }}{{ index $stability "extension" | default "N/A" }} | {{- else if eq $componentType "connector" }} {{- /* connectors only have 2 columns */ -}} {{- else }}{{ index $stability "traces" | default "-" }} | {{ index $stability "metrics" | default "-" }} | {{ index $stability "logs" | default "-" }} | {{- end }}