diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-13 17:16:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-13 17:16:02 +0000 |
commit | 396c327fe40b1db11fc204d7ae7ace84503de681 (patch) | |
tree | 6718eb5d5dcf3c6e3c93e32ac6ac9a857f6ca56e /web/api/formatters/csv/csv.c | |
parent | Releasing debian version 1.38.0-1. (diff) | |
download | netdata-396c327fe40b1db11fc204d7ae7ace84503de681.tar.xz netdata-396c327fe40b1db11fc204d7ae7ace84503de681.zip |
Merging upstream version 1.38.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/api/formatters/csv/csv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/api/formatters/csv/csv.c b/web/api/formatters/csv/csv.c index 603a17169..18009f146 100644 --- a/web/api/formatters/csv/csv.c +++ b/web/api/formatters/csv/csv.c @@ -12,6 +12,7 @@ void rrdr2csv(RRDR *r, BUFFER *wb, uint32_t format, RRDR_OPTIONS options, const // print the csv header for(c = 0, i = 0; c < used ; c++) { if(unlikely(r->od[c] & RRDR_DIMENSION_HIDDEN)) continue; + if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue; if(unlikely((options & RRDR_OPTION_NONZERO) && !(r->od[c] & RRDR_DIMENSION_NONZERO))) continue; if(!i) { @@ -32,6 +33,7 @@ void rrdr2csv(RRDR *r, BUFFER *wb, uint32_t format, RRDR_OPTIONS options, const // print the --- line after header for(c = 0, i = 0; c < used ;c++) { if(unlikely(r->od[c] & RRDR_DIMENSION_HIDDEN)) continue; + if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue; if(unlikely((options & RRDR_OPTION_NONZERO) && !(r->od[c] & RRDR_DIMENSION_NONZERO))) continue; if(!i) { @@ -89,6 +91,8 @@ void rrdr2csv(RRDR *r, BUFFER *wb, uint32_t format, RRDR_OPTIONS options, const if(unlikely(options & RRDR_OPTION_PERCENTAGE)) { total = 0; for(c = 0; c < used ;c++) { + if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue; + NETDATA_DOUBLE n = cn[c]; if(likely((options & RRDR_OPTION_ABSOLUTE) && n < 0)) @@ -104,6 +108,7 @@ void rrdr2csv(RRDR *r, BUFFER *wb, uint32_t format, RRDR_OPTIONS options, const // for each dimension for(c = 0; c < used ;c++) { if(unlikely(r->od[c] & RRDR_DIMENSION_HIDDEN)) continue; + if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue; if(unlikely((options & RRDR_OPTION_NONZERO) && !(r->od[c] & RRDR_DIMENSION_NONZERO))) continue; buffer_strcat(wb, separator); |