mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Adds:
`bills` to `html/ajax_rulesuggest.php` `generate_bill_url` to `html/includes/functions.inc.php` Link to bills in `html/includes/table/alerts.inc.php`
This commit is contained in:
@@ -42,11 +42,17 @@ foreach (dbFetchRows($sql,$param) as $alert) {
|
||||
$log_detail = json_decode(gzuncompress($log),true);
|
||||
$fault_detail = '';
|
||||
foreach ( $log_detail['rule'] as $o=>$tmp_alerts ) {
|
||||
$fallback = true;
|
||||
$fault_detail .= "#".($o+1).": ";
|
||||
$tmp = generate_port_link($tmp_alerts);
|
||||
if( substr($tmp,-5,1) != ">" ) {
|
||||
$fault_detail .= $tmp;
|
||||
} else {
|
||||
if( $tmp_alerts['bill_id'] ) {
|
||||
$fault_detail .= '<a href="'.generate_bill_url($tmp_alerts).'">'.$tmp_alerts['bill_name'].'</a>; ';
|
||||
$fallback = false;
|
||||
}
|
||||
if( $tmp_alerts['port_id'] ) {
|
||||
$fault_detail .= generate_port_link($tmp_alerts).'; ';
|
||||
$fallback = false;
|
||||
}
|
||||
if( $fallback === true ) {
|
||||
foreach ($tmp_alerts as $k=>$v) {
|
||||
if (!empty($v) && $k != 'device_id' && (stristr($k,'id') || stristr($k,'desc') || stristr($k,'msg')) && substr_count($k,'_') <= 1) {
|
||||
$fault_detail .= "$k => '$v', ";
|
||||
|
||||
Reference in New Issue
Block a user