Allow statistics to be run on an empty database

This commit is contained in:
Oliver Gorwits
2018-01-02 13:09:39 +00:00
parent a613084fcf
commit f50f63cc51
2 changed files with 15 additions and 1 deletions

11
Changes
View File

@@ -1,3 +1,14 @@
2.038001 - 2018-01-02
[ENHANCEMENTS]
* Better tooltip for netmap items
* Change to color10 set in netmap
[BUG FIXES]
* Allow statistics to be run on an empty database
2.038000 - 2017-12-31 2.038000 - 2017-12-31
[NEW FEATURES] [NEW FEATURES]

View File

@@ -47,7 +47,10 @@ sub update_stats {
device_ip_count => device_ip_count =>
$schema->resultset('DeviceIp')->count_rs->as_query, $schema->resultset('DeviceIp')->count_rs->as_query,
device_link_count => device_link_count =>
$schema->resultset('Virtual::DeviceLinks')->get_column('aggports')->sum_rs->as_query, $schema->resultset('Virtual::DeviceLinks')->search(undef, {
select => [ { coalesce => [ { sum => 'aggports' }, 0 ] } ],
as => ['totlinks'],
})->get_column('totlinks')->as_query,
device_port_count => device_port_count =>
$schema->resultset('DevicePort')->count_rs->as_query, $schema->resultset('DevicePort')->count_rs->as_query,
device_port_up_count => device_port_up_count =>