mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	minor cleanups, also don't send png mime header when doing graph debug, firefox won't show the debug text then
git-svn-id: http://www.observium.org/svn/observer/trunk@1919 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		| @@ -117,7 +117,7 @@ if (!$auth) | ||||
|       $rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches; | ||||
|       $woo = shell_exec($rrd_cmd); | ||||
|       if ($debug) { echo("<pre>".$rrd_cmd."</pre>"); } | ||||
|       if (is_file($graphfile)) | ||||
|       if (is_file($graphfile) && !$debug) | ||||
|       { | ||||
|         header('Content-type: image/png'); | ||||
|         $fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd); | ||||
|   | ||||
| @@ -12,8 +12,8 @@ if($_SESSION['userlevel'] >= 5) | ||||
|   $ports['up'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D  WHERE I.ifOperStatus = 'up' AND I.ignore = '0' AND I.device_id = D.device_id AND D.ignore = '0'"),0); | ||||
|   $ports['down'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D WHERE I.ifOperStatus = 'down' AND I.ifAdminStatus = 'up' AND I.ignore = '0' AND D.device_id = I.device_id AND D.ignore = '0'"),0); | ||||
|   $ports['shutdown'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D WHERE I.ifAdminStatus = 'down' AND I.ignore = '0' AND D.device_id = I.device_id AND D.ignore = '0'"),0); | ||||
|   $ports['ignored'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D WHERE D.device_id = I.device_id AND ( I.ignore = '1' OR D.ignore = '1')"),0); | ||||
|   $ports['errored'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D WHERE D.device_id = I.device_id AND ( I.ignore = '0' OR D.ignore = '0') AND (I.ifInErrors_delta > '0' OR I.ifOutErrors_delta > '0')"),0); | ||||
|   $ports['ignored'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D WHERE D.device_id = I.device_id AND (I.ignore = '1' OR D.ignore = '1')"),0); | ||||
|   $ports['errored'] = mysql_result(mysql_query("SELECT count(*) FROM ports AS I, devices AS D WHERE D.device_id = I.device_id AND (I.ignore = '0' OR D.ignore = '0') AND (I.ifInErrors_delta > '0' OR I.ifOutErrors_delta > '0')"),0); | ||||
|  | ||||
|   $services['count'] = mysql_result(mysql_query("SELECT count(service_id) FROM services"),0); | ||||
|   $services['up'] = mysql_result(mysql_query("SELECT count(service_id) FROM services  WHERE service_status = '1' AND service_ignore ='0'"),0); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user