mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
updates
git-svn-id: http://www.observium.org/svn/observer/trunk@426 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#error_reporting(E_ALL | E_NOTICE | E_WARNING);
|
||||
|
||||
if($_GET['debug']) {
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 0);
|
||||
@@ -26,10 +24,10 @@ if($_GET['debug']) {
|
||||
ini_set('error_reporting', E_ALL);
|
||||
}
|
||||
|
||||
include("../config.php");
|
||||
include("../includes/functions.php");
|
||||
include("includes/authenticate.inc");
|
||||
if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
|
||||
include("../config.php");
|
||||
include("../includes/functions.php");
|
||||
include("includes/authenticate.inc");
|
||||
if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
|
||||
|
||||
function makeTextBlock($text, $fontfile, $fontsize, $width) {
|
||||
// TODO: handle explicit line-break!
|
||||
|
||||
@@ -45,6 +45,9 @@ if($_GET['debug']) {
|
||||
$os = gethostosbyid($device_id);
|
||||
|
||||
switch ($type) {
|
||||
case 'cisco_entity_sensor':
|
||||
$graph = graph_entity_sensor ($_GET['a'], $graphfile, $from, $to, $width, $height, $title, $vertical);
|
||||
break;
|
||||
case 'fortigate_sessions':
|
||||
$graph = graph_fortigate_sessions ($hostname . "/fortigate-sessions.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
|
||||
break;
|
||||
|
||||
+12
-1
@@ -51,6 +51,18 @@ if($health) {
|
||||
");
|
||||
}
|
||||
|
||||
$cisco_sensors = mysql_result(mysql_query("SELECT count(*) FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND entSensorType != '' AND entSensorType NOT LIKE 'No%'"),0);
|
||||
|
||||
if($cisco_sensors) {
|
||||
echo("
|
||||
<li class=" . $select['ciscosensors'] . ">
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/ciscosensors/'>
|
||||
<img src='images/16/contrast.png' align=absmiddle border=0> Sensors
|
||||
</a>
|
||||
</li>
|
||||
");
|
||||
}
|
||||
|
||||
if(is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/")) {
|
||||
echo("
|
||||
<li class=" . $select['collectd'] . ">
|
||||
@@ -61,7 +73,6 @@ if(is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/")) {
|
||||
");
|
||||
}
|
||||
|
||||
|
||||
if(@mysql_result(mysql_query("select count(interface_id) from interfaces WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['ports'] . ">
|
||||
|
||||
@@ -83,8 +83,6 @@ if($_POST['ifSpeed']) { $where .= " AND I.ifSpeed = '".$_POST['ifSpeed']."'"; }
|
||||
if($_POST['ifAlias']) { $where .= " AND I.ifAlias LIKE '%".$_POST['ifAlias']."%'"; }
|
||||
if($_POST['deleted'] || $_GET['type'] == "deleted") { $where .= " AND I.deleted = '1'"; }
|
||||
|
||||
print_r($_GET);
|
||||
|
||||
$sql = "SELECT * FROM `interfaces` AS I, `devices` AS D WHERE I.device_id = D.device_id $where ORDER BY D.hostname, I.ifIndex";
|
||||
|
||||
$query = mysql_query($sql);
|
||||
|
||||
Reference in New Issue
Block a user