mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
services fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@1222 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -4,7 +4,7 @@ include("includes/defaults.inc.php");
|
||||
include("config.php");
|
||||
include("includes/functions.php");
|
||||
|
||||
$sql = "SELECT * FROM devices AS D, services AS S WHERE D.status = '1' AND S.device_id = D.device_id ORDER by D.device_id DESC";
|
||||
$sql = "SELECT * FROM devices AS D, services AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC";
|
||||
$query = mysql_query($sql);
|
||||
while ($service = mysql_fetch_array($query)) {
|
||||
|
||||
@@ -52,7 +52,8 @@ while ($service = mysql_fetch_array($query)) {
|
||||
shell_exec($create);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd,"N:".$status);
|
||||
|
||||
if($status = "1" || $status = "0") {
|
||||
rrdtool_update($rrd,"N:".$status);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -7,8 +7,6 @@ echo("<a href='".$config['base_url']."/services/details/'>Details</a>");
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
print_r($_GET);
|
||||
|
||||
if($_GET['status'] == '0') { $where = " AND service_status = '0'"; } else { unset ($where); }
|
||||
|
||||
echo("<div style='margin: 5px;'><table cellpadding=7 border=0 cellspacing=0 width=100%>");
|
||||
@@ -39,7 +37,7 @@ if ($_SESSION['userlevel'] >= '5') {
|
||||
|
||||
$periods = array('day', 'week', 'month', 'year');
|
||||
|
||||
echo('<tr style="background-color: $bg; padding: 5px;"><td colspan=6>');
|
||||
echo('<tr style="background-color: '.$bg.'; padding: 5px;"><td colspan=6>');
|
||||
|
||||
foreach($periods as $period) {
|
||||
$graph_array['from'] = $$period;
|
||||
|
||||
Reference in New Issue
Block a user