From: Vsevolod Stakhov Date: Fri, 18 Jan 2013 09:28:32 +0000 (+0400) Subject: Adopt for new piechart library. X-Git-Tag: 0.5.4~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d7f72bdb172d9e0e01a69d4193ad7e96f818ccd3;p=rspamd.git Adopt for new piechart library. --- 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); }