Merge branch 'master' into og-remoteport-fix

This commit is contained in:
Oliver Gorwits
2018-04-08 13:13:04 +01:00
3 changed files with 5 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ __PACKAGE__->result_source_instance->view_definition(<<ENDSQL
AND dp.port !~* 'vlan'
AND (dp.type IS NULL OR dp.type !~* '^(53|ieee8023adLag|propVirtual|l2vlan|l3ipvlan|135|136|137)\$')
AND (dp.name IS NULL OR dp.name !~* 'vlan')
AND (dp.is_master = 'false' OR dp.slave_of IS NOT NULL)
AND dp.ip <= di.ip
GROUP BY left_ip, left_dns, left_name, right_ip, right_dns, right_name
ORDER BY dp.ip

View File

@@ -11,12 +11,13 @@ __PACKAGE__->table('device_port_speed');
__PACKAGE__->result_source_instance->is_virtual(1);
__PACKAGE__->result_source_instance->view_definition(<<ENDSQL
SELECT ip,
sum( COALESCE(dpp.raw_speed,1) ) as total
GREATEST(1, sum( COALESCE(dpp.raw_speed,1) )) as total
FROM device_port
LEFT OUTER JOIN device_port_properties dpp USING (ip, port)
WHERE port !~* 'vlan'
AND (type IS NULL OR type !~* '^(53|ieee8023adLag|propVirtual|l2vlan|l3ipvlan|135|136|137)\$')
AND (name IS NULL OR name !~* 'vlan')
AND (is_master = 'false' OR slave_of IS NOT NULL)
GROUP BY ip
ORDER BY total DESC, ip ASC
ENDSQL