git-svn-id: http://www.observium.org/svn/observer/trunk@426 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-05-06 16:50:51 +00:00
parent e34d66c02d
commit 586de53358
10 changed files with 128 additions and 48 deletions
+4 -6
View File
@@ -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!
+3
View File
@@ -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
View File
@@ -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'] . ">
-2
View File
@@ -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);