summaryrefslogtreecommitdiffstats
path: root/web/api/badges
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
commita836a244a3d2bdd4da1ee2641e3e957850668cea (patch)
treecb87c75b3677fab7144f868435243f864048a1e6 /web/api/badges
parentAdding upstream version 1.38.1. (diff)
downloadnetdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.tar.xz
netdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.zip
Adding upstream version 1.39.0.upstream/1.39.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 8f6eca62..e40e706e 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 ca0f4b7a..b69f35af 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);