further to commit 5efdd750 also for csv output
This commit is contained in:
@@ -185,6 +185,7 @@ get '/ajax/content/device/ports' => require_login sub {
|
||||
template 'ajax/device/ports_csv.tt', {
|
||||
results => $results,
|
||||
nodes => $nodes_name,
|
||||
ips => $ips_name,
|
||||
device => $device,
|
||||
}, { layout => undef };
|
||||
}
|
||||
|
||||
@@ -190,8 +190,7 @@
|
||||
[% mynode.push('') %]
|
||||
[% SET has_ips = 0 %]
|
||||
|
||||
[% IF params.n_ip4 %]
|
||||
[% FOREACH ip IN node.ip4s %]
|
||||
[% FOREACH ip IN node.$ips %]
|
||||
[% SET has_ips = 1 %]
|
||||
|
||||
[% CALL mynode.splice(-3, 1, ip.ip) %]
|
||||
@@ -201,20 +200,6 @@
|
||||
[% CALL myport.splice(c_nodes_pos, mynode.size, mynode) %]
|
||||
[% CSV.dump(myport) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF params.n_ip6 %]
|
||||
[% FOREACH ip IN node.ip6s %]
|
||||
[% SET has_ips = 1 %]
|
||||
|
||||
[% CALL mynode.splice(-3, 1, ip.ip) %]
|
||||
[% CALL mynode.splice(-2, 1, ip.dns) %]
|
||||
[% CALL mynode.splice(-1, 1, (ip.active ? 'No' : 'Yes')) %]
|
||||
|
||||
[% CALL myport.splice(c_nodes_pos, mynode.size, mynode) %]
|
||||
[% CSV.dump(myport) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% CSV.dump(myport) IF NOT has_ips %]
|
||||
[% ELSE %]
|
||||
|
||||
Reference in New Issue
Block a user