[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small patch for alerts displayed in "info" column
- To: hobbit (at) hswn.dk
- Subject: Small patch for alerts displayed in "info" column
- From: Frédéric Mangeant <frederic.mangeant (at) steria.com>
- Date: Mon, 21 Nov 2005 16:51:48 +0100
- Organization: Steria EDC
- User-agent: Thunderbird 1.5 (Windows/20051025)
Hi Henrik
here's a small patch which displays in the "info" column the services
which don't have a recipient.
It displays something like this :
http://img360.imageshack.us/img360/2596/infoalerts7pn.png
Hope you'll find it useful...
Regards,
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
--- hobbitd/hobbitsvc-info.c.orig 2005-11-21 15:51:24.000000000 +0100
+++ hobbitd/hobbitsvc-info.c 2005-11-21 16:43:57.000000000 +0100
@@ -174,6 +174,7 @@
htnames_t hname, lname, tname;
activealerts_t alert;
char l[1024];
+ char noalert[1024];
int i, rcount;
sprintf(l, "<table summary=\"%s Alerts\" border=1>\n", hostname);
@@ -201,6 +202,13 @@
for (i = 0; (i < testcount); i++) {
tname.name = tnames[i].name;
if (have_recipient(&alert, NULL)) { rcount++; print_alert_recipients(&alert, buf, buflen); }
+ else {
+ sprintf(noalert, "<tr><td>%s</td><td><center><i><font color=\"#FF0000\">No recipient</font> \
+ </i></center></td><td><center>-</center></td><td><center>-</center> \
+ </td><td><center>-</center></td><td><center>-</center> \
+ </td><td><center>-</center></td></tr>\n", tname.name);
+ addtobuffer(buf, buflen, noalert);
+ }
}
if (rcount == 0) {