aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/config.pm1
-rwxr-xr-xweb/api/public/switch-state2
-rw-r--r--web/index.html10
3 files changed, 8 insertions, 5 deletions
diff --git a/include/config.pm b/include/config.pm
index 8d4ae19..aabeb44 100755
--- a/include/config.pm
+++ b/include/config.pm
@@ -38,6 +38,7 @@ our @snmp_objects = [
['ciscoEnvMonTemperatureStatusValue'],
['ipIfStatsHCInOctets'],
['ipIfStatsHCOutOctets'],
+ ['ipIfStatsIPVersion'],
['entPhysicalSerialNum'],
['entPhysicalName'],
['entPhysicalHardwareRev'],
diff --git a/web/api/public/switch-state b/web/api/public/switch-state
index d1495d5..8e98205 100755
--- a/web/api/public/switch-state
+++ b/web/api/public/switch-state
@@ -7,7 +7,6 @@ use strict;
use warnings;
use Data::Dumper;
-print "Content-type: text/plain\n\n";
my $target = $ENV{REQUEST_URI};
$target =~ s/$ENV{SCRIPT_NAME}//;
$target =~ s/^\///;
@@ -20,7 +19,6 @@ if (!defined($switch)) {
$q = $nms::web::dbh->prepare('select sysname,extract(epoch from date_trunc(\'second\',time)) as time,data from snmp natural join switches where id in (select max(id) from snmp where ' . $nms::web::when . 'group by switch) and sysname = ' . $nms::web::dbh->quote($switch) . ';');
}
-print "s: $switch, p: $port\n";
$q->execute();
while ( my $ref = $q->fetchrow_hashref() ) {
my $sysname = $ref->{'sysname'};
diff --git a/web/index.html b/web/index.html
index 655204e..bcc1d76 100644
--- a/web/index.html
+++ b/web/index.html
@@ -113,9 +113,13 @@
<div class="row-fluid" id="admin-row">
<div>
<p>Add linknet</p>
- <input id="admin-input-linknet1" type="text" placeholder="Switch 1" />
- <input id="admin-input-linknet2" type="text" placeholder="Switch 2" />
- <button class="btn btn-primary" onclick="nmsAdmin.addLinknet()">Add</button>
+ <div class="form-inline">
+ <div class="form-group">
+ <input id="admin-input-linknet1" class="form-control" type="text" placeholder="Switch 1" />
+ <input id="admin-input-linknet2" class="form-control" type="text" placeholder="Switch 2" />
+ <button class="btn btn-primary" onclick="nmsAdmin.addLinknet()">Add</button>
+ </div>
+ </div>
</div>
<hr>
</div>