handle row.power.power being NULL
fixes this error, since device_port_power.power can be null:
Argument "" isn't numeric in numeric gt (>) at /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/views/ajax/device/ports.tt line 251.
currently only seen on cisco sb switches, which do have all other columns filled in
ip | port | module | admin | status | class | power
---------------+------+--------+-------+------------+--------+-------
10.40.254.150 | fa2 | 1 | true | otherFault | class3 |
10.40.254.150 | fa16 | 1 | true | searching | class3 |
10.40.254.150 | fa3 | 1 | true | searching | class3 |
...
This commit is contained in:
@@ -244,7 +244,7 @@
|
||||
<i class="icon-off nd_power-on"></i>
|
||||
[% END %]
|
||||
<span>
|
||||
[% IF row.power.power > 0 %]
|
||||
[% IF row.power.power AND row.power.power > 0 %]
|
||||
[% row.power.power | html_entity %] mW
|
||||
[% ELSE %]
|
||||
([% row.power.status | html_entity %])
|
||||
|
||||
Reference in New Issue
Block a user