mirror of
https://github.com/drygdryg/netbox-plugin-interface-sync
synced 2024-11-25 18:10:52 +03:00
Added possibility to exclude interfaces panel
This commit is contained in:
parent
00cedbd589
commit
729218f577
@ -9,7 +9,8 @@ class Config(PluginConfig):
|
|||||||
author = 'Victor Golovanenko'
|
author = 'Victor Golovanenko'
|
||||||
author_email = 'drygdryg2014@yandex.ru'
|
author_email = 'drygdryg2014@yandex.ru'
|
||||||
default_settings = {
|
default_settings = {
|
||||||
'exclude_virtual_interfaces': True
|
'exclude_virtual_interfaces': True,
|
||||||
|
'include_interfaces_panel': False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<div class="card">
|
{% if config.include_interfaces_panel %}
|
||||||
<h5 class="card-header">Number of interfaces</h5>
|
<div class="card">
|
||||||
<div class="card-body">
|
<h5 class="card-header">Number of interfaces</h5>
|
||||||
Total interfaces: {{ interfaces|length }}<br>
|
<div class="card-body">
|
||||||
{% if config.exclude_virtual_interfaces %}
|
Total interfaces: {{ interfaces|length }}<br>
|
||||||
Non-virtual interfaces: {{ real_interfaces|length }}<br>
|
{% if config.exclude_virtual_interfaces %}
|
||||||
{% endif %}
|
Non-virtual interfaces: {{ real_interfaces|length }}<br>
|
||||||
Interfaces in the assigned device type: {{ interface_templates|length }}
|
{% endif %}
|
||||||
|
Interfaces in the assigned device type: {{ interface_templates|length }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
Loading…
Reference in New Issue
Block a user