Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
noc
Commits
7561a6f4
Commit
7561a6f4
authored
Aug 15, 2019
by
MaksimSmile13
Browse files
Fix add ddash
parent
a91bc454
Pipeline
#15240
passed with stages
in 11 minutes and 14 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
templates/ddash/template_radio.j2
0 → 100644
View file @
7561a6f4
{% macro radio(port_type) -%}
{% if port_type["ports"][0] and port_type["ports"][0]["descr"] %}
{% set port_name = port_type["ports"][0]["descr"] %}
{% elif port_type["ports"][0] and port_type["ports"][0]["name"] %}
{% set port_name = port_type["ports"][0]["name"] %}
{% elif port_type["ports"][0] %}
{% set port_name = "Lag w/o interfaces" %}
{%endif%}
{% set comma = joiner(",") -%}
{
"current": {
"selected": true,
"tags": [],
"text": "All",
"value": [
"$__all"
]
},
"datasource": null,
"hide": 0,
"includeAll": true,
"label": "{{port_type.name}}",
"multi": true,
"name": "{{port_type.type}}",
"options": [
{
"selected": false,
"text": "All",
"value": "$__all"
},
{%for port in port_type.ports -%}
{{ comma() }}{
"selected": false,
"text": "{%- if port.descr -%}{{port.name}} status : {{ port.status }} ({{port.descr}}){%else%}{{port.name}} status : {{ port.status }}{%- endif -%}",
"value": "{{port.name}}"
}
{%- endfor %}
],
"query": "{%- for port in port_type.ports %}{{port.name}},{% endfor %}",
"refresh": 0,
"type": "custom"
}
{%- endmacro %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment