From 7aa87224aa50162752cb3e02507b69de8db82200 Mon Sep 17 00:00:00 2001 From: laf Date: Wed, 8 Apr 2015 03:01:15 +0100 Subject: [PATCH] Couple of small issues fixed on alerts page --- html/includes/table/alerts.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/html/includes/table/alerts.inc.php b/html/includes/table/alerts.inc.php index 02f61484b..17d83ed64 100644 --- a/html/includes/table/alerts.inc.php +++ b/html/includes/table/alerts.inc.php @@ -38,6 +38,7 @@ foreach (dbFetchRows($sql,$param) as $alert) { $log = dbFetchCell("SELECT details FROM alert_log WHERE rule_id = ? AND device_id = ? ORDER BY id DESC LIMIT 1", array($alert['rule_id'],$alert['device_id'])); $log_detail = json_decode(gzuncompress($log),true); foreach ( $log_detail['rule'] as $tmp_alerts ) { + $fault_detail = ''; foreach ($tmp_alerts as $k=>$v) { if (!empty($v) && $k != 'device_id' && (stristr($k,'id') || stristr($k,'desc')) && substr_count($k,'_') <= 1) { $fault_detail .= $k.' => '.$v."\n "; @@ -93,8 +94,8 @@ foreach (dbFetchRows($sql,$param) as $alert) { } $response[] = array('id'=>"#".$rulei++."", - 'rule'=>"".htmlentities($alert['name'])."", - 'hostname'=>"".$alert['hostname']."", + 'rule'=>"".htmlentities($alert['name'])."", + 'hostname'=>"".$alert['hostname']."", 'timestamp'=>($alert['timestamp'] ? $alert['timestamp'] : "N/A"), 'severity'=>$severity, 'ack_col'=>$ack_col,