Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Classivc UI: fixd invalid json output for hosts and services in confi…
Browse files Browse the repository at this point in the history
…g.cgi

Values for "low_flap_threshold" and "high_flap_threshold" are now quoted.

Refs: #9240
  • Loading branch information
bb-Ricardo committed May 7, 2015
1 parent de42341 commit ce25248
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cgi/config.c
Expand Up @@ -1179,12 +1179,12 @@ void display_hosts(void) {
if (temp_host->low_flap_threshold == 0.0)
printf("\"low_flap_threshold\": \"Program-wide value\", ");
else
printf("\"low_flap_threshold\": %3.1f%%, ", temp_host->low_flap_threshold);
printf("\"low_flap_threshold\": \"%3.1f%%\", ", temp_host->low_flap_threshold);

if (temp_host->high_flap_threshold == 0.0)
printf("\"high_flap_threshold\": \"Program-wide value\", ");
else
printf("\"high_flap_threshold\": %3.1f%%, ", temp_host->high_flap_threshold);
printf("\"high_flap_threshold\": \"%3.1f%%\", ", temp_host->high_flap_threshold);

printf("\"flap_detection_options\": [ ");
} else if (content_type == CSV_CONTENT) {
Expand Down Expand Up @@ -2461,12 +2461,12 @@ void display_services(void) {
if (temp_service->low_flap_threshold == 0.0)
printf("\"low_flap_threshold\": \"Program-wide value\", ");
else
printf("\"low_flap_threshold\": %3.1f%%, ", temp_service->low_flap_threshold);
printf("\"low_flap_threshold\": \"%3.1f%%\", ", temp_service->low_flap_threshold);

if (temp_service->high_flap_threshold == 0.0)
printf("\"high_flap_threshold\": \"Program-wide value\", ");
else
printf("\"high_flap_threshold\": %3.1f%%, ", temp_service->high_flap_threshold);
printf("\"high_flap_threshold\": \"%3.1f%%\", ", temp_service->high_flap_threshold);

printf("\"flap_detection_options\": [ ");
} else if (content_type == CSV_CONTENT) {
Expand Down

0 comments on commit ce25248

Please sign in to comment.