show SNMP::Info version in About page
This commit is contained in:
		| @@ -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: | ||||
|  | ||||
|   | ||||
| @@ -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<community> DB table. | ||||
|  | ||||
| =back | ||||
|   | ||||
| @@ -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, | ||||
|         }; | ||||
| }; | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|       <div class="hero-unit"> | ||||
|         <h2>About Netdisco</h2> | ||||
|         <small>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.</small> | ||||
|       </div> | ||||
|     <div class="row"> | ||||
| @@ -21,28 +21,33 @@ | ||||
|               <th><b><a href="http://netdisco.org">App::Netdisco</a></b></th> | ||||
|               <th>[% disco_ver | html_entity %]</th> | ||||
|             </tr> | ||||
|             <tr> | ||||
|               <th><a href="https://metacpan.org/module/netdisco-db-deploy">DB Schema</a></th> | ||||
|               <th>v[% schema_ver | html_entity %]</th> | ||||
|             </tr> | ||||
|             <tr> | ||||
|               <th><a href="http://http://perldancer.org/">Dancer</a></th> | ||||
|               <th>[% dancer_ver | html_entity %]</th> | ||||
|             </tr> | ||||
|             <tr> | ||||
|               <th><a href="http://www.perl.org">Perl</a></th> | ||||
|               <th>[% perl_ver | html_entity %]</th> | ||||
|               <th><a href="http://getbootstrap.com">Bootstrap</a></th> | ||||
|               <th>[%# Can't determine magically %] 2.3.1</th> | ||||
|             </tr> | ||||
|             <tr> | ||||
|               <th><a href="http://www.postgresql.org">PostgreSQL</a></th> | ||||
|               <th> | ||||
|                 [% db_version| html_entity %] DBI [% dbi_ver | html_entity %] | ||||
|                 [% db_version| html_entity %].<br /> | ||||
|                  DBI [% dbi_ver | html_entity %], | ||||
|                 DBD::Pg [% dbdpg_ver | html_entity %] | ||||
|               </th> | ||||
|             </tr> | ||||
|             <tr> | ||||
|               <th><a href="http://getbootstrap.com">Bootstrap</a></th> | ||||
|               <th>[% # Can't determine magically %] 2.3.1</th> | ||||
|               <th><a href="http://http://snmp-info.sourceforge.net/">SNMP::Info</a></th> | ||||
|               <th>[% snmpinfo_ver | html_entity %]</th> | ||||
|             </tr> | ||||
|             <tr> | ||||
|               <th><a href="http://http://snmp-info.sourceforge.net/">SNMP::Info</a></th> | ||||
|               <th>[% # Don't want to load in web to get version %]</th> | ||||
|               <th><a href="http://www.perl.org">Perl</a></th> | ||||
|               <th>[% perl_ver | html_entity %]</th> | ||||
|             </tr> | ||||
|           </tbody> | ||||
|         </table> | ||||
| @@ -76,4 +81,4 @@ | ||||
|         </table> | ||||
|       </div> | ||||
|     </div> | ||||
| </div> <!-- /container --> | ||||
| </div> <!-- /container --> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user