remove unused stats counts, and improve text on summary

This commit is contained in:
Oliver Gorwits
2017-06-28 16:32:06 +01:00
parent 3355b0610c
commit bd7f40ef88
4 changed files with 2 additions and 14 deletions

View File

@@ -79,17 +79,11 @@ sub expire {
ip_active_count =>
$schema->resultset('NodeIp')->search({-bool => 'active'},
{columns => 'ip', distinct => 1})->count_rs->as_query,
ip_count =>
$schema->resultset('NodeIp')->search(undef,
{columns => 'ip', distinct => 1})->count_rs->as_query,
node_table_count =>
$schema->resultset('Node')->count_rs->as_query,
node_active_count =>
$schema->resultset('Node')->search({-bool => 'active'},
{columns => 'mac', distinct => 1})->count_rs->as_query,
node_count =>
$schema->resultset('Node')->search(undef,
{columns => 'mac', distinct => 1})->count_rs->as_query,
netdisco_ver => pretty_version($App::Netdisco::VERSION, 3),
snmpinfo_ver => $snmpinfo_ver,

View File

@@ -24,14 +24,10 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_nullable => 0 },
"ip_active_count",
{ data_type => "integer", is_nullable => 0 },
"ip_count",
{ data_type => "integer", is_nullable => 0 },
"node_table_count",
{ data_type => "integer", is_nullable => 0 },
"node_active_count",
{ data_type => "integer", is_nullable => 0 },
"node_count",
{ data_type => "integer", is_nullable => 0 },
"netdisco_ver",
{ data_type => "text", is_nullable => 1 },

View File

@@ -10,10 +10,8 @@ CREATE TABLE "statistics" (
"device_port_up_count" integer NOT NULL,
"ip_table_count" integer NOT NULL,
"ip_active_count" integer NOT NULL,
"ip_count" integer NOT NULL,
"node_table_count" integer NOT NULL,
"node_active_count" integer NOT NULL,
"node_count" integer NOT NULL,
"netdisco_ver" text,
"snmpinfo_ver" text,

View File

@@ -21,10 +21,10 @@
<th>[% stats.device_link_count| format_number %] layer 2 links between devices</th>
</tr>
<tr>
<th>[% stats.node_table_count | format_number %] nodes of which [% stats.node_active_count | format_number %] are active</th>
<th>[% stats.node_table_count | format_number %] nodes logged, of which [% stats.node_active_count | format_number %] are active</th>
</tr>
<tr>
<th>[% stats.ip_table_count | format_number %] IPs of which [% stats.ip_active_count | format_number %] are active</th>
<th>[% stats.ip_table_count | format_number %] IPs logged, of which [% stats.ip_active_count | format_number %] are active</th>
</tr>
<tr>
<th>Statistics last generated on [% stats.day %]</th>