0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-02 20:48:06 +00:00

integrations make <details> open ()

integrations details open
This commit is contained in:
Ilya Mashchenko 2024-06-14 15:51:27 +03:00 committed by GitHub
parent 75d9ea124e
commit d9c807e23c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View file

@ -61,8 +61,10 @@ def clean_and_write(md, path):
Then it writes the buffer on the file provided.
"""
# clean first, replace
md = md.replace("{% details summary=\"", "<details><summary>").replace(
"\" %}", "</summary>\n").replace("{% /details %}", "</details>\n")
md = md.replace("{% details summary=\"", "<details><summary>")
md = md.replace("{% details open=true summary=\"", "<details open><summary>")
md = md.replace("\" %}", "</summary>\n")
md = md.replace("{% /details %}", "</details>\n")
path.write_text(md)

View file

@ -2,7 +2,7 @@
## Metrics
[% if entry.metrics.folding.enabled and not clean %]
{% details summary="[[ entry.metrics.folding.title ]]" %}
{% details open=true summary="[[ entry.metrics.folding.title ]]" %}
[% endif %]
Metrics grouped by *scope*.

View file

@ -60,7 +60,7 @@ There is no configuration file.
[% if entry.setup.configuration.options.list %]
[% if entry.setup.configuration.options.folding.enabled and not clean %]
{% details summary="[[ entry.setup.configuration.options.folding.title ]]" %}
{% details open=true summary="[[ entry.setup.configuration.options.folding.title ]]" %}
[% endif %]
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
@ -92,7 +92,7 @@ There are no configuration options.
[[ example.description ]]
[% if example.folding.enabled and not clean %]
{% details summary="[[ entry.setup.configuration.examples.folding.title ]]" %}
{% details open=true summary="[[ entry.setup.configuration.examples.folding.title ]]" %}
[% endif %]
```yaml
[[ example.config ]]