Dmitriev Roman 5 лет назад
Родитель
Сommit
f95f226696

+ 4 - 4
html/admin/devices/switchport.php

@@ -68,12 +68,12 @@ if ($d_uplink) { $cl="info"; }
         print "<td class=\"$cl\">" . $d_vlan . "</td>\n";
 
         global $torrus_url;
-        $cacti_url = get_cacti_graph($switch['ip'], $d_snmp);
-        if (! isset($torrus_url) and (! isset($cacti_url))) {
+        $f_cacti_url = get_cacti_graph($switch['ip'], $d_snmp);
+        if (! isset($torrus_url) and (! isset($f_cacti_url))) {
                 print "<td class=\"$cl\"></td>\n";
         	} else {
-                if (isset($cacti_url)) {
-                    $snmp_url = "<a href=\"$cacti_url\">Статистика</a>";
+                if (isset($f_cacti_url)) {
+                    $snmp_url = "<a href=\"$f_cacti_url\">Статистика</a>";
         	    }
 		if (isset($torrus_url)) {
                     $normed_ifname = trim(str_replace("/", "_", $ifname));

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

@@ -173,12 +173,12 @@ if ($switch['snmp_version']>0) {
             }
             print "<td class=\"$cl_error\">" . $perrors . "</td>\n";
             global $torrus_url;
-            $cacti_url = get_cacti_graph($switch['ip'], $d_snmp);
-            if (! isset($torrus_url) and (! isset($cacti_url))) {
+            $f_cacti_url = get_cacti_graph($switch['ip'], $d_snmp);
+            if (! isset($torrus_url) and (! isset($f_cacti_url))) {
                 print "<td class=\"$cl\">" . $ifname . "</td>\n";
             } else {
-                if (isset($cacti_url)) {
-                    $snmp_url = "<a href=\"$cacti_url\">" . $ifname . "</a>";
+                if (isset($f_cacti_url)) {
+                    $snmp_url = "<a href=\"$f_cacti_url\">" . $ifname . "</a>";
                 }
                 if (isset($torrus_url)) {
                     $normed_ifname = trim(str_replace("/", "_", $ifname));

+ 4 - 6
html/inc/common.php

@@ -3235,20 +3235,18 @@ function init_option($db)
     global $hotspot_user_id;
     $hotspot_user_id = get_option($db, 43);
 
-    if (! isset($hotspot_user_id)) {
-        $hotspot_user_id = $default_user_id;
-    }
+    if (! isset($hotspot_user_id)) { $hotspot_user_id = $default_user_id; }
 
     global $cacti_url;
-    $cacti_url = get_option($db, 58);
+    $cacti_url = rtrim(get_option($db, 58),'/');
     if (preg_match('/127.0.0.1/', $cacti_url)) { $cacti_url=NULL; }
 
     global $nagios_url;
-    $nagios_url = get_option($db, 57).'/cgi-bin';
+    $nagios_url = rtrim(get_option($db, 57),'/').'/cgi-bin/';
     if (preg_match('/127.0.0.1/', $nagios_url)) { $nagios_url=NULL; }
 
     global $torrus_url;
-    $torrus_url = get_option($db, 59).'/Collector?nodeid=if//HOST_IP//IF_NAME////inoutbps';
+    $torrus_url = rtrim(get_option($db, 59),'/').'?nodeid=if//HOST_IP//IF_NAME////inoutbps';
     if (preg_match('/127.0.0.1/', $torrus_url)) { $torrus_url=NULL; }
 
 }

+ 0 - 13
scripts/Rstat/config.pm

@@ -57,19 +57,6 @@ $use_smsd
 $smsaero_wait
 $smsd_group
 $smsd_user
-$kannel_base_url
-$kannel_dlr_url
-$kannel_login
-$kannel_password
-$kannel_spool
-$smsaero_base_url
-$smsaero_login
-$smsaero_md5pass
-$sms_spool_dir
-$sms_from
-$smsaero_digital
-$smsaero_type
-$smsd_spool_dir
 $def_timeout
 $parallel_process_count
 $save_detail

+ 1 - 0
updates/20210408/db-patch-mysql-option.sql

@@ -0,0 +1 @@
+UPDATE `config_options` SET `default_value` = 'http://127.0.0.1/torrus/CollectorName/' WHERE `config_options`.`id` = 59;