\n");
@@ -338,32 +343,37 @@ int main(int argc, char **argv) {
/* left column of the first row */
printf("\n");
- switch(display_type) {
- case DISPLAY_HOST_AVAIL:
- snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Host Availability Report");
- break;
- case DISPLAY_SERVICE_AVAIL:
- snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Service Availability Report");
- break;
- case DISPLAY_HOSTGROUP_AVAIL:
- snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Hostgroup Availability Report");
- break;
- case DISPLAY_SERVICEGROUP_AVAIL:
- snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Servicegroup Availability Report");
- break;
- default:
- snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Availability Report");
- break;
- }
+ switch (display_type) {
+
+ case DISPLAY_HOST_AVAIL:
+ snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Host Availability Report");
+ break;
+
+ case DISPLAY_SERVICE_AVAIL:
+ snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Service Availability Report");
+ break;
+
+ case DISPLAY_HOSTGROUP_AVAIL:
+ snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Hostgroup Availability Report");
+ break;
+
+ case DISPLAY_SERVICEGROUP_AVAIL:
+ snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Servicegroup Availability Report");
+ break;
+
+ default:
+ snprintf(temp_buffer, sizeof(temp_buffer) - 1, "Availability Report");
+ break;
+ }
temp_buffer[sizeof(temp_buffer) - 1] = '\x0';
display_info_table(temp_buffer, FALSE, ¤t_authdata);
- if(((display_type == DISPLAY_HOST_AVAIL && show_all_hosts == FALSE) || (display_type == DISPLAY_SERVICE_AVAIL && show_all_services == FALSE)) && get_date_parts == FALSE) {
+ if (((display_type == DISPLAY_HOST_AVAIL && show_all_hosts == FALSE) || (display_type == DISPLAY_SERVICE_AVAIL && show_all_services == FALSE)) && get_date_parts == FALSE) {
printf("\n");
printf("\n");
- if(display_type == DISPLAY_HOST_AVAIL && show_all_hosts == FALSE) {
+ if (display_type == DISPLAY_HOST_AVAIL && show_all_hosts == FALSE) {
host_report_url("all", "View Availability Report For All Hosts");
printf(" \n");
#ifdef USE_TRENDS
@@ -376,7 +386,7 @@ int main(int argc, char **argv) {
printf("View Alert History For This Host \n", HISTORY_CGI, url_encode(host_name));
printf("View Notifications For This Host \n", NOTIFICATIONS_CGI, url_encode(host_name));
}
- else if(display_type == DISPLAY_SERVICE_AVAIL && show_all_services == FALSE) {
+ else if (display_type == DISPLAY_SERVICE_AVAIL && show_all_services == FALSE) {
host_report_url(host_name, "View Availability Report For This Host");
printf(" \n");
service_report_url("null", "all", "View Availability Report For All Services");
@@ -404,29 +414,29 @@ int main(int argc, char **argv) {
/* center column of top row */
printf(" | \n");
- if(display_type != DISPLAY_NO_AVAIL && get_date_parts == FALSE) {
+ if (display_type != DISPLAY_NO_AVAIL && get_date_parts == FALSE) {
printf("\n");
- if(display_type == DISPLAY_HOST_AVAIL) {
- if(show_all_hosts == TRUE)
+ if (display_type == DISPLAY_HOST_AVAIL) {
+ if (show_all_hosts == TRUE)
printf("All Hosts");
else
printf("Host '%s'", host_name);
}
- else if(display_type == DISPLAY_SERVICE_AVAIL) {
- if(show_all_services == TRUE)
+ else if (display_type == DISPLAY_SERVICE_AVAIL) {
+ if (show_all_services == TRUE)
printf("All Services");
else
printf("Service '%s' On Host '%s'", svc_description, host_name);
}
- else if(display_type == DISPLAY_HOSTGROUP_AVAIL) {
- if(show_all_hostgroups == TRUE)
+ else if (display_type == DISPLAY_HOSTGROUP_AVAIL) {
+ if (show_all_hostgroups == TRUE)
printf("All Hostgroups");
else
printf("Hostgroup '%s'", hostgroup_name);
}
- else if(display_type == DISPLAY_SERVICEGROUP_AVAIL) {
- if(show_all_servicegroups == TRUE)
+ else if (display_type == DISPLAY_SERVICEGROUP_AVAIL) {
+ if (show_all_servicegroups == TRUE)
printf("All Servicegroups");
else
printf("Servicegroup '%s'", servicegroup_name);
@@ -458,7 +468,7 @@ int main(int argc, char **argv) {
printf(" | |