implement show link speeds on links
This commit is contained in:
@@ -11,10 +11,11 @@ __PACKAGE__->table('device_links');
|
||||
__PACKAGE__->result_source_instance->is_virtual(1);
|
||||
__PACKAGE__->result_source_instance->view_definition(<<ENDSQL
|
||||
SELECT dp.ip AS left_ip, dp.port AS left_port, dp.name AS left_descr,
|
||||
dp.speed,
|
||||
replace(replace(btrim(dp.speed, 'bps'), '.0', ''), ' ', '') AS speed,
|
||||
dp2.ip AS right_ip, dp2.port AS right_port, dp2.name AS right_descr
|
||||
FROM ( SELECT device_port.ip, device_port.port, device_port.name,
|
||||
device_port.speed,
|
||||
(CASE WHEN device_port.speed LIKE '%bps' THEN device_port.speed
|
||||
ELSE '' END) as speed,
|
||||
device_port.remote_ip, device_port.remote_port
|
||||
FROM device_port
|
||||
WHERE device_port.remote_port IS NOT NULL
|
||||
|
||||
Reference in New Issue
Block a user