add device port external links support

This commit is contained in:
Oliver Gorwits
2023-12-05 21:11:43 +00:00
parent d428b82220
commit 2afa56dde9
3 changed files with 49 additions and 17 deletions

View File

@@ -1,3 +1,4 @@
[% PROCESS 'externallinks.tt' -%]
[% SET user_can_port_control = user_has_role('port_control', device) %]
<table id="dp-data-table" class="table table-bordered table-striped" width="100%" cellspacing="0">
<thead>
@@ -5,6 +6,7 @@
<th></th>
[% FOREACH item IN settings.port_columns %]
[% NEXT IF item.name == 'c_admin' %]
[% NEXT IF item.name == 'c_links' AND settings.external_links.device_port.empty %]
[% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %]
[% NEXT UNLESS params.${item.name} %]
[% SET th_class = '' %]
@@ -177,6 +179,15 @@
[% END %]
[% IF params.c_links AND settings.external_links.device_port.size > 0 %]
<td>
[% INCLUDE external_device_port_links
item = row
d = device
%]
</td>
[% END %]
[% IF params.c_speed_admin %]
<td>[% row.speed_admin | html_entity %]</td>
[% END %]