From b7e4f1bb345f865b647d851cd7c18a11c6f1a92d Mon Sep 17 00:00:00 2001 From: laf Date: Sat, 11 Apr 2015 18:11:26 +0100 Subject: [PATCH] Trying new way to show alerts --- 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 406563b9b..82bce89ee 100644 --- a/html/includes/table/alerts.inc.php +++ b/html/includes/table/alerts.inc.php @@ -44,9 +44,10 @@ foreach (dbFetchRows($sql,$param) as $alert) { $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 "; + $fault_detail .= $k.' => '.$v.", "; } } + $fault_detail = rtrim($fault_detail,", "); $fault_detail .= "\n"; } @@ -98,7 +99,7 @@ foreach (dbFetchRows($sql,$param) as $alert) { $response[] = array('id'=>"#".$rulei++."", 'rule'=>"".htmlentities($alert['name'])."", - 'hostname'=>"".$alert['hostname']."", + 'hostname'=>"".$alert['hostname']."
$fault_detail
", 'timestamp'=>($alert['timestamp'] ? $alert['timestamp'] : "N/A"), 'severity'=>$severity, 'ack_col'=>$ack_col,