Modified: trunk/patches/nagios_layout.patch
===================================================================
--- trunk/patches/nagios_layout.patch 2012-12-07 16:25:37 UTC (rev 149)
+++ trunk/patches/nagios_layout.patch 2012-12-07 17:29:10 UTC (rev 150)
@@ -113,7 +113,7 @@
if((display_type == DISPLAY_HOST_INFO && temp_host != NULL) || (display_type == DISPLAY_SERVICE_INFO && temp_host != NULL && temp_service != NULL) || (display_type == DISPLAY_HOSTGROUP_INFO && temp_hostgroup != NULL) || (display_type == DISPLAY_SERVICEGROUP_INFO && temp_servicegroup != NULL)) {
-+ printf("<table class='infoBox'>");
++ printf("<table class='infoBox'>");
+
if(display_type == DISPLAY_HOST_INFO) {
- printf("<DIV CLASS='data'>Host</DIV>\n");
@@ -127,30 +127,30 @@
- printf("<DIV CLASS='dataTitle'><A HREF=''>%s</A></DIV>\n", STATUS_CGI, url_encode(temp_parenthost->host_name), temp_parenthost->host_name);
- printf("<BR>");
+
-+ printf("<tr><td align=right class='infoBoxTitle'>Host:</td><td>%s (%s)</td></tr>", temp_host->alias, temp_host->name);
++ printf("<tr><td align=right class='infoBoxTitle'>Host:</td><td>%s (%s)</td></tr>", temp_host->alias, temp_host->name);
+
-+ if (temp_host->parent_hosts != NULL) {
-+ printf("<tr><td align=right class='infoBoxTitle'>Parents:</td><td>");
-+ found = FALSE;
-+ for(temp_parenthost = temp_host->parent_hosts; temp_parenthost != NULL; temp_parenthost = temp_parenthost->next) {
-+ if (found == TRUE)
-+ printf(", ");
-+ printf("<a href=''>%s</a>", STATUS_CGI, url_encode(temp_parenthost->host_name), temp_parenthost->host_name);
-+ found = TRUE;
-+ }
-+ printf("</td></tr>");
++ if (temp_host->parent_hosts != NULL) {
++ printf("<tr><td align=right class='infoBoxTitle'>Parents:</td><td>");
++ found = FALSE;
++ for(temp_parenthost = temp_host->parent_hosts; temp_parenthost != NULL; temp_parenthost = temp_parenthost->next) {
++ if (found == TRUE)
++ printf(", ");
++ printf("<a href=''>%s</a>", STATUS_CGI, url_encode(temp_parenthost->host_name), temp_parenthost->host_name);
++ found = TRUE;
++ }
++ printf("</td></tr>");
}
- printf("<DIV CLASS='data'>Member of</DIV><DIV CLASS='dataTitle'>");
-+ printf("<tr><td align=right class='infoBoxTitle'>Member of:</td><td>");
-+ found = FALSE;
++ printf("<tr><td align=right class='infoBoxTitle'>Member of:</td><td>");
++ found = FALSE;
for(temp_hostgroup = hostgroup_list; temp_hostgroup != NULL; temp_hostgroup = temp_hostgroup->next) {
- if(is_host_member_of_hostgroup(temp_hostgroup, temp_host) == TRUE) {
-+ if(is_host_member_of_hostgroup(temp_hostgroup, temp_host) == TRUE){
++ if(is_host_member_of_hostgroup(temp_hostgroup, temp_host) == TRUE){
if(found == TRUE)
printf(", ");
- printf("<A HREF=''>%s</A>", STATUS_CGI, url_encode(temp_hostgroup->group_name), temp_hostgroup->group_name);
-+ printf("<a href=''>%s</a>", STATUS_CGI, url_encode(temp_hostgroup->group_name), temp_hostgroup->group_name);
++ printf("<a href=''>%s</a>", STATUS_CGI, url_encode(temp_hostgroup->group_name), temp_hostgroup->group_name);
found = TRUE;
}
}
@@ -163,9 +163,9 @@
printf("No hostgroups");
- printf("</DIV><BR>\n");
- printf("<DIV CLASS='data'>%s</DIV>\n", temp_host->address);
-+ printf("</td></tr>");
++ printf("</td></tr>");
+
-+ printf("<tr><td align=right class='infoBoxTitle'>Address:</td><td>%s</td></tr>", temp_host->address);
++ printf("<tr><td align=right class='infoBoxTitle'>Address:</td><td>%s</td></tr>", temp_host->address);
+
}
if(display_type == DISPLAY_SERVICE_INFO) {
@@ -175,22 +175,22 @@
- printf("<DIV CLASS='data'>Member of</DIV><DIV CLASS='dataTitle'>");
- for(temp_servicegroup = servicegroup_list; temp_servicegroup != NULL; temp_servicegroup = temp_servicegroup->next) {
+
-+ printf("<tr><td align=right class='infoBoxTitle'>Service:</td><td>%s</td></tr>", service_desc);
++ printf("<tr><td align=right class='infoBoxTitle'>Service:</td><td>%s</td></tr>", service_desc);
+
-+ printf(
-+ "<tr><td align=right class='infoBoxTitle'>On host:</td></td><td>%s (<a href=''>%s</a>)</td></tr>",
-+ temp_host->alias, EXTINFO_CGI, DISPLAY_HOST_INFO,
-+ url_encode(temp_host->name), temp_host->name
-+ );
++ printf(
++ "<tr><td align=right class='infoBoxTitle'>On host:</td></td><td>%s (<a href=''>%s</a>)</td></tr>",
++ temp_host->alias, EXTINFO_CGI, DISPLAY_HOST_INFO,
++ url_encode(temp_host->name), temp_host->name
++ );
+
-+ printf("<tr><td align=right class='infoBoxTitle'>Member of:</td><td>");
-+ found = FALSE;
-+ for(temp_servicegroup=servicegroup_list; temp_servicegroup != NULL; temp_servicegroup = temp_servicegroup->next) {
++ printf("<tr><td align=right class='infoBoxTitle'>Member of:</td><td>");
++ found = FALSE;
++ for(temp_servicegroup=servicegroup_list; temp_servicegroup != NULL; temp_servicegroup = temp_servicegroup->next) {
if(is_service_member_of_servicegroup(temp_servicegroup, temp_service) == TRUE) {
if(found == TRUE)
printf(", ");
- printf("<A HREF=''>%s</A>", STATUS_CGI, url_encode(temp_servicegroup->group_name), temp_servicegroup->group_name);
-+ printf("<a href=''>%s</a>", STATUS_CGI, url_encode(temp_servicegroup->group_name), temp_servicegroup->group_name);
++ printf("<a href=''>%s</a>", STATUS_CGI, url_encode(temp_servicegroup->group_name), temp_servicegroup->group_name);
found = TRUE;
}
}
@@ -202,10 +202,10 @@
if(found == FALSE)
- printf("No servicegroups.");
- printf("</DIV><BR>\n");
-+ printf("No servicegroups");
-+ printf("</td></tr>");
++ printf("No servicegroups");
++ printf("</td></tr>");
+
-+ printf("<tr><td align=right class='infoBoxTitle'>Address:</td><td>%s</td></tr>", temp_host->address);
++ printf("<tr><td align=right class='infoBoxTitle'>Address:</td><td>%s</td></tr>", temp_host->address);
- printf("<DIV CLASS='data'>%s</DIV>\n", temp_host->address);
}