reorder ports csv cols to match device ports tab
This commit is contained in:
@@ -6,15 +6,7 @@
|
|||||||
[% NEXT IF item.name == 'c_admin' %]
|
[% NEXT IF item.name == 'c_admin' %]
|
||||||
[% NEXT UNLESS params.${item.name} %]
|
[% NEXT UNLESS params.${item.name} %]
|
||||||
|
|
||||||
[% IF item.name == 'c_nodes' %]
|
[% IF item.name == 'c_duplex' %]
|
||||||
[% SET c_nodes_pos = headers.size %]
|
|
||||||
[% headers.push('Node MAC') %]
|
|
||||||
[% headers.push('Archived Node') %]
|
|
||||||
[% headers.push('Age Stamp') IF params.n_age %]
|
|
||||||
[% headers.push('Node IP') IF params.n_ip4 OR params.n_ip6 %]
|
|
||||||
[% headers.push('Node DNS') IF params.n_ip4 OR params.n_ip6 %]
|
|
||||||
[% headers.push('Archived IP') IF params.n_ip4 OR params.n_ip6 %]
|
|
||||||
[% ELSIF item.name == 'c_duplex' %]
|
|
||||||
[% headers.push('Duplex Setting') %]
|
[% headers.push('Duplex Setting') %]
|
||||||
[% headers.push('Duplex') %]
|
[% headers.push('Duplex') %]
|
||||||
[% ELSIF item.name == 'c_power' %]
|
[% ELSIF item.name == 'c_power' %]
|
||||||
@@ -27,6 +19,14 @@
|
|||||||
[% headers.push('PAE AuthSession User') %]
|
[% headers.push('PAE AuthSession User') %]
|
||||||
[% headers.push('PAE AuthSession MAB') %]
|
[% headers.push('PAE AuthSession MAB') %]
|
||||||
[% headers.push('PAE Last EAPOL Frame Source') %]
|
[% headers.push('PAE Last EAPOL Frame Source') %]
|
||||||
|
[% ELSIF item.name == 'c_nodes' %]
|
||||||
|
[% SET c_nodes_pos = headers.size %]
|
||||||
|
[% headers.push('Node MAC') %]
|
||||||
|
[% headers.push('Archived Node') %]
|
||||||
|
[% headers.push('Age Stamp') IF params.n_age %]
|
||||||
|
[% headers.push('Node IP') IF params.n_ip4 OR params.n_ip6 %]
|
||||||
|
[% headers.push('Node DNS') IF params.n_ip4 OR params.n_ip6 %]
|
||||||
|
[% headers.push('Archived IP') IF params.n_ip4 OR params.n_ip6 %]
|
||||||
[% ELSIF item.name == 'c_neighbors' %]
|
[% ELSIF item.name == 'c_neighbors' %]
|
||||||
[% headers.push('Neighbor IP') %]
|
[% headers.push('Neighbor IP') %]
|
||||||
[% headers.push('Neighbor DNS') %]
|
[% headers.push('Neighbor DNS') %]
|
||||||
@@ -42,28 +42,10 @@
|
|||||||
[% FOREACH row IN results %]
|
[% FOREACH row IN results %]
|
||||||
[% SET myport = [] %]
|
[% SET myport = [] %]
|
||||||
|
|
||||||
[% FOREACH config IN settings._extra_device_port_cols %]
|
|
||||||
[% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
|
|
||||||
[% TRY %]
|
|
||||||
[% PROCESS "plugin/${config.name}/device_port_column_csv.tt" %]
|
|
||||||
[% CATCH %]
|
|
||||||
[% myport.push( row.get_column(config.field) ) %]
|
|
||||||
[% END %]
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
[% IF params.c_port %]
|
[% IF params.c_port %]
|
||||||
[% myport.push(row.port) %]
|
[% myport.push(row.port) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% FOREACH config IN settings._extra_device_port_cols %]
|
|
||||||
[% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
|
|
||||||
[% TRY %]
|
|
||||||
[% PROCESS "plugin/${config.name}/device_port_column_csv.tt" %]
|
|
||||||
[% CATCH %]
|
|
||||||
[% myport.push( row.get_column(config.field) ) %]
|
|
||||||
[% END %]
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
[% IF params.c_descr %]
|
[% IF params.c_descr %]
|
||||||
[% myport.push(row.descr) %]
|
[% myport.push(row.descr) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
@@ -76,16 +58,6 @@
|
|||||||
[% myport.push(row.type) %]
|
[% myport.push(row.type) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_duplex %]
|
|
||||||
[% IF row.up == 'up' AND row.duplex %]
|
|
||||||
[% myport.push( row.duplex_admin.ucfirst || 'Auto' ) %]
|
|
||||||
[% myport.push( row.duplex.ucfirst ) %]
|
|
||||||
[% ELSE %]
|
|
||||||
[% myport.push('') %]
|
|
||||||
[% myport.push('') %]
|
|
||||||
[% END %]
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
[% IF params.c_ifindex %]
|
[% IF params.c_ifindex %]
|
||||||
[% myport.push(row.ifindex) %]
|
[% myport.push(row.ifindex) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
@@ -98,14 +70,33 @@
|
|||||||
[% myport.push(row.name) %]
|
[% myport.push(row.name) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_speed %]
|
[% FOREACH config IN settings._extra_device_port_cols %]
|
||||||
[% myport.push(row.speed) %]
|
[% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
|
||||||
|
[% TRY %]
|
||||||
|
[% PROCESS "plugin/${config.name}/device_port_column_csv.tt" %]
|
||||||
|
[% CATCH %]
|
||||||
|
[% myport.push( row.get_column(config.field) ) %]
|
||||||
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_speed_admin %]
|
[% IF params.c_speed_admin %]
|
||||||
[% myport.push(row.speed_admin) %]
|
[% myport.push(row.speed_admin) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
[% IF params.c_speed %]
|
||||||
|
[% myport.push(row.speed) %]
|
||||||
|
[% END %]
|
||||||
|
|
||||||
|
[% IF params.c_duplex %]
|
||||||
|
[% IF row.up == 'up' AND row.duplex %]
|
||||||
|
[% myport.push( row.duplex_admin.ucfirst || 'Auto' ) %]
|
||||||
|
[% myport.push( row.duplex.ucfirst ) %]
|
||||||
|
[% ELSE %]
|
||||||
|
[% myport.push('') %]
|
||||||
|
[% myport.push('') %]
|
||||||
|
[% END %]
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_error %]
|
[% IF params.c_error %]
|
||||||
[% myport.push(row.error_disable_cause) %]
|
[% myport.push(row.error_disable_cause) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
@@ -153,6 +144,15 @@
|
|||||||
[% myport.push( row.pae_last_eapol_frame_source ) %]
|
[% myport.push( row.pae_last_eapol_frame_source ) %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
[% FOREACH config IN settings._extra_device_port_cols %]
|
||||||
|
[% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
|
||||||
|
[% TRY %]
|
||||||
|
[% PROCESS "plugin/${config.name}/device_port_column_csv.tt" %]
|
||||||
|
[% CATCH %]
|
||||||
|
[% myport.push( row.get_column(config.field) ) %]
|
||||||
|
[% END %]
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% IF params.c_nodes %]
|
[% IF params.c_nodes %]
|
||||||
[% myport.push('') %]
|
[% myport.push('') %]
|
||||||
[% myport.push('') %]
|
[% myport.push('') %]
|
||||||
|
|||||||
Reference in New Issue
Block a user