From 3db062dcab78ea5ac36deae57986f5fc9227d9b0 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 23 Sep 2013 13:17:01 +0100 Subject: [PATCH] show SNMP::Info version in About page --- Netdisco/lib/App/Netdisco.pm | 2 +- .../lib/App/Netdisco/Manual/ReleaseNotes.pod | 2 +- Netdisco/lib/App/Netdisco/Web/About.pm | 5 ++++ Netdisco/share/views/about.tt | 23 +++++++++++-------- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index a77bf95b..72fa6de7 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -83,7 +83,7 @@ App::Netdisco - An open source web-based network management tool. =head1 Introduction Netdisco is a web-based network management tool designed for network -administrators. Data is collected into a Postgres database using SNMP. +administrators. Data is collected into a PostgreSQL database using SNMP. Some of the things you can do with Netdisco: diff --git a/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod b/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod index f24fc479..47f69371 100644 --- a/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod +++ b/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod @@ -54,7 +54,7 @@ only the daemon config contains any community strings. =item * -Use separate Postgres users for web frontend and daemon, such that the web +Use separate PostgreSQL users for web frontend and daemon, such that the web frontend user cannot SELECT from the C DB table. =back diff --git a/Netdisco/lib/App/Netdisco/Web/About.pm b/Netdisco/lib/App/Netdisco/Web/About.pm index a8be2e09..78a545fa 100644 --- a/Netdisco/lib/App/Netdisco/Web/About.pm +++ b/Netdisco/lib/App/Netdisco/Web/About.pm @@ -56,6 +56,9 @@ get '/about' => require_login sub { my $dbi_ver = $DBI::VERSION; my $dbdpg_ver = $DBD::Pg::VERSION; + eval 'require SNMP::Info'; + my $snmpinfo_ver = ($@ ? 'n/a' : $SNMP::Info::VERSION); + var( nav => 'about' ); template 'about', @@ -75,6 +78,8 @@ get '/about' => require_login sub { db_version => $db_version, dbi_ver => $dbi_ver, dbdpg_ver => $dbdpg_ver, + snmpinfo_ver => $snmpinfo_ver, + schema_ver => $schema_version, }; }; diff --git a/Netdisco/share/views/about.tt b/Netdisco/share/views/about.tt index adb37239..bc0bf43a 100644 --- a/Netdisco/share/views/about.tt +++ b/Netdisco/share/views/about.tt @@ -3,7 +3,7 @@

About Netdisco

Netdisco is a web-based network management tool designed for - network administrators. Data is collected into a Postgres database + network administrators. Data is collected into a PostgreSQL database using SNMP.
@@ -21,28 +21,33 @@ App::Netdisco [% disco_ver | html_entity %] + + DB Schema + v[% schema_ver | html_entity %] + Dancer [% dancer_ver | html_entity %] - Perl - [% perl_ver | html_entity %] + Bootstrap + [%# Can't determine magically %] 2.3.1 PostgreSQL - [% db_version| html_entity %] DBI [% dbi_ver | html_entity %] + [% db_version| html_entity %].
+  DBI [% dbi_ver | html_entity %], DBD::Pg [% dbdpg_ver | html_entity %] - Bootstrap - [% # Can't determine magically %] 2.3.1 + SNMP::Info + [% snmpinfo_ver | html_entity %] - SNMP::Info - [% # Don't want to load in web to get version %] + Perl + [% perl_ver | html_entity %] @@ -76,4 +81,4 @@
- \ No newline at end of file +