1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00
webvirtcloud/interfaces/templates/link_badge.html
catborise 00a44f7621 fix(interfaces): a link state libvirt reports as unknown is said in words
libvirt names an unknown link state "unknown", which the interfaces
page showed as "Link unknown" in English in every language. It is now
the translated "Link unknown", as when there is no state.
2026-11-21 20:34:51 +03:00

1 line
520 B
HTML

{% load i18n %}{# a link state as libvirt reports it: up, down, another (dormant, lowerlayerdown...) or none #}{% if link == "up" %}<span class="badge text-bg-success">{% trans "Link up" %}</span>{% elif link == "down" %}<span class="badge text-bg-secondary">{% trans "Link down" %}</span>{% elif link and link != "unknown" %}<span class="badge text-bg-light border">{% blocktrans %}Link {{ link }}{% endblocktrans %}</span>{% else %}<span class="badge text-bg-light border">{% trans "Link unknown" %}</span>{% endif %}