Browse Source

changed log level warning messages from collector to debug
removed No state for switchport status page

root 1 year ago
parent
commit
d63e210
3 changed files with 16 additions and 5 deletions
  1. 3 3
      html/admin/devices/switchstatus.php
  2. 11 0
      html/inc/common.php
  3. 2 2
      scripts/eye-statd.pl

+ 3 - 3
html/admin/devices/switchstatus.php

@@ -191,9 +191,9 @@ print_editdevice_submenu($page_url, $id, $device['device_type'], $user_info['log
             }
             print "</td>\n";
             print "<td class='" . $cl . "' >" . get_port_comment($db_link, $row['id'], $row['comment']) . "</td>\n";
-            print "<td class='" . $cl . "' >" . get_qa($row['uplink']) . "</td>\n";
-            print "<td class='" . $cl . "' >" . get_qa($row['nagios']) . "</td>\n";
-            print "<td class='" . $cl . "' >" . get_qa($row['skip']) . "</td>\n";
+            print "<td class='" . $cl . "' >" . get_yes($row['uplink']) . "</td>\n";
+            print "<td class='" . $cl . "' >" . get_yes($row['nagios']) . "</td>\n";
+            print "<td class='" . $cl . "' >" . get_yes($row['skip']) . "</td>\n";
             $poe_info = "POE:None";
 
             $ifname = $row['ifName'];

+ 11 - 0
html/inc/common.php

@@ -1275,6 +1275,17 @@ function get_qa($qa_value, $text = FALSE)
         }
 }
 
+function get_yes($qa_value, $text = FALSE)
+{
+    if ($text) {
+        if ($qa_value == 1) { return "Да"; }
+        return "";
+        } else {
+        if ($qa_value == 1) { return '<span style="font-size: 16px;">✓</span>'; }
+        return "";
+        }
+}
+
 function print_td_qa ($qa_value, $text = FALSE, $parent_class = '')
 {
 $cl = "data_green";

+ 2 - 2
scripts/eye-statd.pl

@@ -601,7 +601,7 @@ if ($traf_record->{direction}) {
         #skip create router interface as user
         if (exists $routers_by_ip{$traf_record->{src_ip}}) { next; }
 	if (!$office_networks->match_string($traf_record->{src_ip})) {
-	    db_log_warning($hdb,"Unknown src network at router $router_id:: proto=>$traf_record->{proto} src: $traf_record->{src_ip}:$traf_record->{src_port} dst: $traf_record->{dst_ip}:$traf_record->{dst_port}");
+	    log_debug("Unknown src network at router $router_id:: proto=>$traf_record->{proto} src: $traf_record->{src_ip}:$traf_record->{src_port} dst: $traf_record->{dst_ip}:$traf_record->{dst_port}");
 	    next;
 	    }
         $user_ip = $traf_record->{src_ip};
@@ -645,7 +645,7 @@ if ($traf_record->{direction}) {
                 }
 	}
     if (!$user_ip) {
-	log_warning("Unknown dst user ip at router $router_id:: proto=>$traf_record->{proto} src: $traf_record->{src_ip}:$traf_record->{src_port} dst: $traf_record->{xdst_ip}:$traf_record->{dst_port}");
+	log_debug("Unknown dst user ip at router $router_id:: proto=>$traf_record->{proto} src: $traf_record->{src_ip}:$traf_record->{src_port} dst: $traf_record->{xdst_ip}:$traf_record->{dst_port}");
 	}
     }