diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-08 16:27:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-08 16:27:04 +0000 |
commit | a836a244a3d2bdd4da1ee2641e3e957850668cea (patch) | |
tree | cb87c75b3677fab7144f868435243f864048a1e6 /web/api/badges | |
parent | Adding upstream version 1.38.1. (diff) | |
download | netdata-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.md | 4 | ||||
-rw-r--r-- | web/api/badges/web_buffer_svg.c | 8 |
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); |