summaryrefslogtreecommitdiffstats
path: root/web/api/badges
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/badges')
-rw-r--r--web/api/badges/README.md4
-rw-r--r--web/api/badges/web_buffer_svg.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/web/api/badges/README.md b/web/api/badges/README.md
index 8f6eca62a..e40e706eb 100644
--- a/web/api/badges/README.md
+++ b/web/api/badges/README.md
@@ -1,6 +1,10 @@
<!--
title: "Netdata badges"
custom_edit_url: https://github.com/netdata/netdata/edit/master/web/api/badges/README.md
+sidebar_label: "Netdata badges"
+learn_status: "Published"
+learn_topic_type: "References"
+learn_rel_path: "Developers/Web/Api"
-->
# Netdata badges
diff --git a/web/api/badges/web_buffer_svg.c b/web/api/badges/web_buffer_svg.c
index ca0f4b7a0..b69f35afa 100644
--- a/web/api/badges/web_buffer_svg.c
+++ b/web/api/badges/web_buffer_svg.c
@@ -767,7 +767,7 @@ void buffer_svg(BUFFER *wb, const char *label,
label_color_parsed = parse_color_argument(label_color, "555");
value_color_parsed = parse_color_argument(value_color_buffer, "555");
- wb->contenttype = CT_IMAGE_SVG_XML;
+ wb->content_type = CT_IMAGE_SVG_XML;
total_width = total_width * scale / 100.0;
height = height * scale / 100.0;
@@ -898,10 +898,10 @@ int web_client_api_request_v1_badge(RRDHOST *host, struct web_client *w, char *u
RRDSET *st = NULL;
while(url) {
- char *value = mystrsep(&url, "&");
+ char *value = strsep_skip_consecutive_separators(&url, "&");
if(!value || !*value) continue;
- char *name = mystrsep(&value, "=");
+ char *name = strsep_skip_consecutive_separators(&value, "=");
if(!name || !*name) continue;
if(!value || !*value) continue;
@@ -923,7 +923,7 @@ int web_client_api_request_v1_badge(RRDHOST *host, struct web_client *w, char *u
else if(!strcmp(name, "points")) points_str = value;
else if(!strcmp(name, "group_options")) group_options = value;
else if(!strcmp(name, "group")) {
- group = web_client_api_request_v1_data_group(value, RRDR_GROUPING_AVERAGE);
+ group = time_grouping_parse(value, RRDR_GROUPING_AVERAGE);
}
else if(!strcmp(name, "options")) {
options |= web_client_api_request_v1_data_options(value);