-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(website): render input and output badges for all components #23204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,25 +232,37 @@ | |
| {{/* Source/transform/sink output */}} | ||
| {{ with .component_output }} | ||
| <div class="py-3 px-5"> | ||
|
|
||
| {{ with .metrics }} | ||
| <span class="flex items-center justify-between"> | ||
| {{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "output-metrics" "href" "#output-metrics") }} | ||
| {{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "output-metrics" "href" "#output-metrics") }} | ||
|
|
||
| <a href="/docs/about/under-the-hood/architecture/data-model/metric"> | ||
| {{/* Heroicon: solid/question-mark-circle */}} | ||
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> | ||
| <path fill-rule="evenodd" | ||
| d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" | ||
| clip-rule="evenodd"/> | ||
| </svg> | ||
| </a> | ||
| </span> | ||
|
|
||
| <a href="/docs/about/under-the-hood/architecture/data-model/metric"> | ||
| {{/* Heroicon: solid/question-mark-circle */}} | ||
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> | ||
| <path fill-rule="evenodd" | ||
| d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" | ||
| clip-rule="evenodd" /> | ||
| </svg> | ||
| </a> | ||
| </span> | ||
| <div class="mt-3 border rounded divide-y dark:border-gray-700 dark:divide-gray-700"> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I don't remember deleting this but it renders the "?" href just fine. |
||
| {{ template "telemetry" . }} | ||
| </div> | ||
| {{ end }} | ||
|
|
||
| {{ with .traces }} | ||
| <span class="flex items-center justify-between"> | ||
| {{ partial "heading.html" (dict "text" "Traces" "level" 3 "id" "output-traces") }} | ||
| </span> | ||
|
|
||
| <div class="mt-3 border rounded divide-y dark:border-gray-700 dark:divide-gray-700"> | ||
| {{ template "telemetry" . }} | ||
| </div> | ||
| {{ end }} | ||
|
|
||
|
|
||
| {{ with .logs }} | ||
| <span class="flex items-center justify-between"> | ||
| {{ partial "heading.html" (dict "text" "Logs" "level" 3 "id" "output-logs" "href" "#output-logs") }} | ||
|
|
@@ -265,6 +277,7 @@ | |
| </a> | ||
| </span> | ||
|
|
||
|
|
||
| <div | ||
| class="mt-3 border-2 rounded-md border-yellow-400 flex flex-col space-y-1.5 py-2 px-3"> | ||
| <span> | ||
|
|
@@ -382,7 +395,8 @@ | |
| {{/* Source/transform/sink output */}} | ||
| {{ with .component_telemetry }} | ||
| <div class="py-4 px-6"> | ||
| {{ with .metrics }} | ||
|
|
||
| {{ with .metrics }} | ||
pront marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <span class="flex items-center justify-between"> | ||
| {{ partial "heading.html" (dict "text" "Metrics" "level" 3 "id" "telemetry-metrics" "href" "#telemetry-metrics") | ||
| }} | ||
|
|
@@ -410,6 +424,7 @@ | |
| {{ template "telemetry" . }} | ||
| </div> | ||
| {{ end }} | ||
|
|
||
| </div> | ||
| {{ end }} | ||
|
|
||
|
|
@@ -1712,140 +1727,6 @@ <h3 id="{{ $code }}"> | |
| </div> | ||
| {{ end }} | ||
|
|
||
| {{ define "logs_output" }} | ||
| {{ range $k, $v := . }} | ||
| {{ $title := $k | title }} | ||
| {{ $id := printf "%s-log-output" $k }} | ||
| <div class="py-3 px-5"> | ||
| <span class="flex justify-between items-center"> | ||
| <span class="text-lg"> | ||
| {{ partial "heading.html" (dict "text" $title "level" 4 "id" $id) }} | ||
| </span> | ||
| </span> | ||
|
|
||
| {{ with $v.description }} | ||
| <div class="mt-3 prose dark:prose-dark"> | ||
| {{ . | markdownify }} | ||
| </div> | ||
| {{ end }} | ||
|
|
||
| {{ with $v.fields }} | ||
| {{ $id := printf "%s-fields" $k }} | ||
| <div class="mt-4 font-semibold"> | ||
| {{ partial "heading.html" (dict "text" "Fields" "level" 5 "id" $id) }} | ||
| </div> | ||
|
|
||
| <div class="mt-2 flex flex-col divide-y dark:divide-gray-700 border rounded dark:border-gray-700"> | ||
|
|
||
| {{ range $k, $v := . }} | ||
| <div class="py-2.5 px-3.5"> | ||
| <span class="flex justify-between items-center"> | ||
| <span class="font-mono font-semibold"> | ||
| {{ $k }} | ||
| </span> | ||
|
|
||
| <span class="flex space-x-1"> | ||
| {{ if $v.required }} | ||
| {{ partial "badge.html" (dict "word" "required" "color" "red") }} | ||
| {{ else }} | ||
| {{ partial "badge.html" (dict "word" "optional" "color" "blue") }} | ||
| {{ end }} | ||
|
|
||
| {{ range $k, $v := $v.type }} | ||
| {{ $isArray := eq $k "array" }} | ||
| {{ if $isArray }} | ||
| {{ range $k, $v := $v.items.type }} | ||
| {{ $name := printf "[%s]" $k }} | ||
| {{ partial "badge.html" (dict "word" $name "color" "gray") }} | ||
| {{ end }} | ||
| {{ else }} | ||
| {{ partial "badge.html" (dict "word" $k "color" "gray") }} | ||
|
|
||
| {{ with $v.syntax }} | ||
| {{ partial "badge.html" (dict "word" . "color" "gray") }} | ||
| {{ end }} | ||
| {{ end }} | ||
| {{ end }} | ||
| </span> | ||
| </span> | ||
|
|
||
| {{ with $v.description }} | ||
| <div class="mt-2 prose dark:prose-dark"> | ||
| {{ . | markdownify }} | ||
| </div> | ||
| {{ end }} | ||
|
|
||
| {{ range $k, $v := $v.type }} | ||
| {{ with $v.examples }} | ||
| <div class="mt-2"> | ||
| <span> | ||
| Examples | ||
| </span> | ||
|
|
||
| <div class="mt-1.5 flex flex-col space-y-1 text-sm"> | ||
| {{ range . }} | ||
| {{ template "code" . }} | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| {{ end }} | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| {{ end }} | ||
| {{ end }} | ||
|
|
||
| {{ define "telemetry" }} | ||
| {{ range $k, $v := . }} | ||
| <div class="py-3 px-5"> | ||
| <span class="flex justify-between items-center"> | ||
| <span class="font-mono font-bold text-dark dark:text-gray-200"> | ||
| {{ partial "heading.html" (dict "text" $k "level" 4) }} | ||
| </span> | ||
|
|
||
| {{ partial "badge.html" (dict "word" $v.type "color" "gray") }} | ||
| </span> | ||
|
|
||
| {{ with $v.description }} | ||
| <div class="my-3 prose dark:prose-dark max-w-none"> | ||
| {{ . | markdownify }} | ||
| </div> | ||
| {{ end }} | ||
|
|
||
| {{ with $v.tags }} | ||
| <div class="mt-3 border rounded dark:border-gray-700"> | ||
| <div class="flex flex-col divide-y dark:divide-gray-700"> | ||
| {{ range $k, $v := . }} | ||
| <div class="py-2.5 px-4"> | ||
| <span class="flex justify-between items-center"> | ||
| <span class="font-mono font-semibold"> | ||
| {{ $k }} | ||
| </span> | ||
|
|
||
| <span> | ||
| {{ if not $v.required }} | ||
| {{ partial "badge.html" (dict "word" "optional" "color" "blue") }} | ||
| {{ end }} | ||
| </span> | ||
| </span> | ||
|
|
||
| {{ with $v.description }} | ||
| <div class="prose dark:prose-dark"> | ||
| {{ . | markdownify }} | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| {{ end }} | ||
| {{ end }} | ||
|
|
||
| {{ define "vrl-function-legend" }} | ||
| {{/* Heroicon: outline/map */}} | ||
| <div class="flex items-center space-x-2"> | ||
|
|
@@ -2244,4 +2125,4 @@ <h3 id="{{ $code }}"> | |
| </div> | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| {{ end }} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can think about improving this at a second phase.