mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This time, really fix it.
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
* @subpackage Alerts
|
* @subpackage Alerts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// loop through each room
|
||||||
foreach($opts as $option) {
|
foreach($opts as $option) {
|
||||||
$url = $option['url'];
|
$url = $option['url'];
|
||||||
foreach($obj as $key=>$value) {
|
foreach($obj as $key=>$value) {
|
||||||
@@ -37,9 +38,11 @@ foreach($opts as $option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sane default of making the message color green if the message indicates
|
// Sane default of making the message color green if the message indicates
|
||||||
// that the alert recovered.
|
// that the alert recovered. If it rebooted, make it yellow.
|
||||||
if(stripos($data["message"], "recovered")) {
|
if(stripos($obj["msg"], "recovered")) {
|
||||||
$color = "green";
|
$color = "green";
|
||||||
|
} elseif(stripos($obj["msg"], "rebooted")) {
|
||||||
|
$color = "yellow";
|
||||||
} else {
|
} else {
|
||||||
$color = $option["color"];
|
$color = $option["color"];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user