From d7f72bdb172d9e0e01a69d4193ad7e96f818ccd3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 18 Jan 2013 13:28:32 +0400 Subject: [PATCH] Adopt for new piechart library. --- src/webui.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/webui.c b/src/webui.c index 8666e76ca..25f9e7547 100644 --- a/src/webui.c +++ b/src/webui.c @@ -974,17 +974,13 @@ http_handle_pie_chart (struct evhttp_request *req, gpointer arg) data[2] = ctx->srv->stat->actions_stat[METRIC_ACTION_GREYLIST] / total * 100.; data[3] = ctx->srv->stat->actions_stat[METRIC_ACTION_REJECT] / total * 100.; - evbuffer_add_printf (evb, "[{\"label\": \"Clean messages\", \"color\": \"" - COLOR_CLEAN "\", \"data\":%.2f},", data[0]); - evbuffer_add_printf (evb, "{\"label\": \"Probable spam messages\", \"color\": \"" - COLOR_PROBABLE_SPAM "\", \"data\":%.2f},", data[1]); - evbuffer_add_printf (evb, "{\"label\": \"Greylisted messages\", \"color\": \"" - COLOR_GREYLIST "\", \"data\":%.2f},", data[2]); - evbuffer_add_printf (evb, "{\"label\": \"Rejected messages\", \"color\": \"" - COLOR_REJECT "\", \"data\":%.2f}]" CRLF, data[3]); + evbuffer_add_printf (evb, "[{\"Clean messages\":%.2f},", data[0]); + evbuffer_add_printf (evb, "{\"Probable spam messages\":%.2f},", data[1]); + evbuffer_add_printf (evb, "{\"Greylisted messages\":%.2f},", data[2]); + evbuffer_add_printf (evb, "{\"Rejected messages\":%.2f}]" CRLF, data[3]); } else { - evbuffer_add_printf (evb, "[{\"label\": \"Not scanned messages\", \"data\": 0}]" CRLF); + evbuffer_add_printf (evb, "[{\"Not scanned messages\": 0}]" CRLF); } -- 2.39.5