diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-13 17:15:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-13 17:15:59 +0000 |
commit | ff2a76910f4b4da1741e9888f673343099784045 (patch) | |
tree | 347a727d55562dd12b4c49bff87322abc28255b9 /web/api/formatters/csv | |
parent | Adding upstream version 1.38.0. (diff) | |
download | netdata-ff2a76910f4b4da1741e9888f673343099784045.tar.xz netdata-ff2a76910f4b4da1741e9888f673343099784045.zip |
Adding upstream version 1.38.1.upstream/1.38.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/formatters/csv')
-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); |