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/formatters/ssv | |
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/formatters/ssv')
-rw-r--r-- | web/api/formatters/ssv/README.md | 4 | ||||
-rw-r--r-- | web/api/formatters/ssv/ssv.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/web/api/formatters/ssv/README.md b/web/api/formatters/ssv/README.md index 4ca2a64ca..434d56721 100644 --- a/web/api/formatters/ssv/README.md +++ b/web/api/formatters/ssv/README.md @@ -1,6 +1,10 @@ <!-- title: "SSV formatter" custom_edit_url: https://github.com/netdata/netdata/edit/master/web/api/formatters/ssv/README.md +sidebar_label: "SSV formatter" +learn_status: "Published" +learn_topic_type: "References" +learn_rel_path: "Developers/Web/Api/Formatters" --> # SSV formatter diff --git a/web/api/formatters/ssv/ssv.c b/web/api/formatters/ssv/ssv.c index d561980d9..65de0464b 100644 --- a/web/api/formatters/ssv/ssv.c +++ b/web/api/formatters/ssv/ssv.c @@ -20,12 +20,12 @@ void rrdr2ssv(RRDR *r, BUFFER *wb, RRDR_OPTIONS options, const char *prefix, con NETDATA_DOUBLE v = rrdr2value(r, i, options, &all_values_are_null, NULL); if(likely(i != start)) { - if(r->min > v) r->min = v; - if(r->max < v) r->max = v; + if(r->view.min > v) r->view.min = v; + if(r->view.max < v) r->view.max = v; } else { - r->min = v; - r->max = v; + r->view.min = v; + r->view.max = v; } if(likely(i != start)) @@ -38,7 +38,7 @@ void rrdr2ssv(RRDR *r, BUFFER *wb, RRDR_OPTIONS options, const char *prefix, con buffer_strcat(wb, "null"); } else - buffer_rrd_value(wb, v); + buffer_print_netdata_double(wb, v); } buffer_strcat(wb, suffix); //info("RRD2SSV(): %s: END", r->st->id); |