[% FOREACH item IN vars.port_columns %] [% NEXT UNLESS params.${item.name} %] [% item.label %] [% END %] [% FOREACH row in results %] [% IF params.c_port %] [% END %] [% IF params.c_descr %] [% END %] [% IF params.c_type %] [% END %] [% IF params.c_duplex %] [% END %] [% IF params.c_lastchange %] [% END %] [% IF params.c_name %] [% END %] [% IF params.c_speed %] [% END %] [% IF params.c_mac %] [% END %] [% IF params.c_mtu %] [% END %] [% IF params.c_vlan %] [% END %] [% IF params.c_vmember %] [% END %] [% IF params.c_connected %] [% END %] [% IF params.c_stp %] [% END %] [% IF params.c_up %] [% END %] [% END %]
[% IF row.up_admin == 'down' %] s [% ELSIF row.stp == 'blocking' %] b [% ELSIF row.is_free(params.age_num, params.age_unit) %] f [% ELSIF row.up_admin == 'up' AND row.up == 'down' %] d [% END %] [% row.port | html_entity %] [% row.descr | html_entity %][% row.type | html_entity %] [% IF row.up == 'up' AND row.duplex %] [% row.duplex_admin | html_entity %] / [% row.duplex | html_entity %] [% END %] [% row.get_column('lastchange_stamp') | html_entity %][% row.name | html_entity %][% row.speed | html_entity %][% row.mac | html_entity %][% row.mtu | html_entity %] [% row.vlan | html_entity %] [%# this is really ugly because for some reason I could not get size/max to work on row.tagged_vlans.all %] [% SET output = '' %] [% SET count = 0 %] [% FOREACH vlan IN row.tagged_vlans %] [% SET output = output _ '' _ vlan.vlan _ '' %] [% SET output = output _ ', ' IF NOT loop.last %] [% SET count = count + 1 %] [% END %] [% IF count > 10 %] [% SET output = '
(' _ count _ ')
' _ 'Show VLANs
' _ output %] [% SET output = output _ '
' %] [% END %] [% output %]
[% row.connected | html_entity %][% row.stp | html_entity %] [% row.up_admin | html_entity %] / [% row.up | html_entity %]