format statistics numbers, use dancer built-in for dancer and perl versions
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
[% USE Number.Format %]
|
||||
<div class="container">
|
||||
<div class="row nd_hero-row">
|
||||
<div class="hero-unit">
|
||||
@@ -27,7 +28,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a href="http://http://perldancer.org/">Dancer</a></th>
|
||||
<th>[% dancer_ver | html_entity %]</th>
|
||||
<th>[% dancer_version | html_entity %]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a href="http://getbootstrap.com">Bootstrap</a></th>
|
||||
@@ -47,7 +48,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a href="http://www.perl.org">Perl</a></th>
|
||||
<th>[% perl_ver | html_entity %]</th>
|
||||
<th>[% perl_version | html_entity %]</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -62,17 +63,17 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>[% device_count %] devices with [% device_port_count %] interfaces
|
||||
using [% device_count + device_ip_count %] IPs</th>
|
||||
<th>[% device_count | format_number %] devices with [% device_port_count | format_number %] interfaces
|
||||
using [% device_count + device_ip_count | format_number %] IPs</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>[% device_links %] layer 2 links between devices.</th>
|
||||
<th>[% device_links | format_number %] layer 2 links between devices.</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>[% node_count %] nodes in [% node_table_count %] entries. </th>
|
||||
<th>[% node_count | format_number %] nodes in [% node_table_count | format_number %] entries. </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>[% ip_count %] IPs in [% ip_table_count %] entries.</th>
|
||||
<th>[% ip_count | format_number %] IPs in [% ip_table_count | format_number %] entries.</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Statistics took [% process_time %] seconds to process.</th>
|
||||
|
||||
Reference in New Issue
Block a user