summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-30 15:06:38 +0100
committerGitHub <noreply@github.com>2019-08-30 15:06:38 +0100
commit2f988241c2763cb0e27d91ce312989f6f0a9577c (patch)
tree4d437d83cf355a5211911b148c51919303498391 /src
parent799bd0cd780ef7b56bd86b67d9b464a631f4cc96 (diff)
parent3c7505ebf0da2ff21973f4a63574a1aeacd4cf82 (diff)
downloadrspamd-2f988241c2763cb0e27d91ce312989f6f0a9577c.tar.gz
rspamd-2f988241c2763cb0e27d91ce312989f6f0a9577c.zip
Merge pull request #3021 from moisseev/webui
[WebUI] Rename Throughput time intervals
Diffstat (limited to 'src')
-rw-r--r--src/controller.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/controller.c b/src/controller.c
index 108f558e0..450c730dc 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -1201,7 +1201,7 @@ rspamd_controller_graph_point (gulong t, gulong step,
/*
* Graph command handler:
- * request: /graph?type=<hourly|daily|weekly|monthly>
+ * request: /graph?type=<day|week|month|year>
* headers: Password
* reply: json [
* { label: "Foo", data: 11 },
@@ -1223,10 +1223,10 @@ rspamd_controller_handle_graph (
gdouble *acc;
ucl_object_t *res, *elt[METRIC_ACTION_MAX];
enum {
- rra_hourly = 0,
- rra_daily,
- rra_weekly,
- rra_monthly,
+ rra_day = 0,
+ rra_week,
+ rra_month,
+ rra_year,
rra_invalid
} rra_num = rra_invalid;
/* How many points are we going to send to display */
@@ -1260,17 +1260,17 @@ rspamd_controller_handle_graph (
return 0;
}
- if (value->len == 6 && rspamd_lc_cmp (value->begin, "hourly", value->len) == 0) {
- rra_num = rra_hourly;
+ if (value->len == 3 && rspamd_lc_cmp (value->begin, "day", value->len) == 0) {
+ rra_num = rra_day;
}
- else if (value->len == 5 && rspamd_lc_cmp (value->begin, "daily", value->len) == 0) {
- rra_num = rra_daily;
+ else if (value->len == 4 && rspamd_lc_cmp (value->begin, "week", value->len) == 0) {
+ rra_num = rra_week;
}
- else if (value->len == 6 && rspamd_lc_cmp (value->begin, "weekly", value->len) == 0) {
- rra_num = rra_weekly;
+ else if (value->len == 5 && rspamd_lc_cmp (value->begin, "month", value->len) == 0) {
+ rra_num = rra_month;
}
- else if (value->len == 7 && rspamd_lc_cmp (value->begin, "monthly", value->len) == 0) {
- rra_num = rra_monthly;
+ else if (value->len == 4 && rspamd_lc_cmp (value->begin, "year", value->len) == 0) {
+ rra_num = rra_year;
}
g_hash_table_unref (query);