From 3a76021655f89aadb498d40c80a95aad0e188966 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Thu, 26 Sep 2013 19:32:16 -0400 Subject: [PATCH] format statistics numbers, use dancer built-in for dancer and perl versions --- Netdisco/lib/App/Netdisco/Web/About.pm | 4 ---- Netdisco/share/views/about.tt | 15 ++++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/Web/About.pm b/Netdisco/lib/App/Netdisco/Web/About.pm index 78a545fa..3d80825f 100644 --- a/Netdisco/lib/App/Netdisco/Web/About.pm +++ b/Netdisco/lib/App/Netdisco/Web/About.pm @@ -50,8 +50,6 @@ get '/about' => require_login sub { my $process_time = $time2 - $time1; my $disco_ver = $App::Netdisco::VERSION; - my $dancer_ver = $Dancer::VERSION; - my $perl_ver = sprintf( "v%vd", $^V ); my $db_version = $devices->next->get_column('version'); my $dbi_ver = $DBI::VERSION; my $dbdpg_ver = $DBD::Pg::VERSION; @@ -73,8 +71,6 @@ get '/about' => require_login sub { node_table_count => $node_table_count, process_time => $process_time, disco_ver => $disco_ver, - dancer_ver => $dancer_ver, - perl_ver => $perl_ver, db_version => $db_version, dbi_ver => $dbi_ver, dbdpg_ver => $dbdpg_ver, diff --git a/Netdisco/share/views/about.tt b/Netdisco/share/views/about.tt index bc0bf43a..8293955b 100644 --- a/Netdisco/share/views/about.tt +++ b/Netdisco/share/views/about.tt @@ -1,3 +1,4 @@ +[% USE Number.Format %]
@@ -27,7 +28,7 @@ Dancer - [% dancer_ver | html_entity %] + [% dancer_version | html_entity %] Bootstrap @@ -47,7 +48,7 @@ Perl - [% perl_ver | html_entity %] + [% perl_version | html_entity %] @@ -62,17 +63,17 @@ - [% device_count %] devices with [% device_port_count %] interfaces - using [% device_count + device_ip_count %] IPs + [% device_count | format_number %] devices with [% device_port_count | format_number %] interfaces + using [% device_count + device_ip_count | format_number %] IPs - [% device_links %] layer 2 links between devices. + [% device_links | format_number %] layer 2 links between devices. - [% node_count %] nodes in [% node_table_count %] entries. + [% node_count | format_number %] nodes in [% node_table_count | format_number %] entries. - [% ip_count %] IPs in [% ip_table_count %] entries. + [% ip_count | format_number %] IPs in [% ip_table_count | format_number %] entries. Statistics took [% process_time %] seconds to process.