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,