summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2023-09-06 11:35:53 +0300
committerGitHub <noreply@github.com>2023-09-06 11:35:53 +0300
commitf059f4da7d04deecbf1b40f2c585cd58f45debe4 (patch)
tree7af47382b5c4bdc7ab14360af40c6018b130a1fd /web
parent5c132e4ec8dce371352a1a7f97d6170e98d6b82e (diff)
Reset the obsolete flag on service thread (#15892)
* reset the RRDHOST_FLAG_PENDING_OBSOLETE_CHARTS flag * do rrdset_free even when in dbengine mode * remove RRDSET_FLAG_ARCHIVED * remove commented line * use is_available_for_viewers
Diffstat (limited to 'web')
-rw-r--r--web/api/formatters/charts2json.c4
-rw-r--r--web/api/formatters/charts2json.h2
-rw-r--r--web/api/web_api_v1.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/web/api/formatters/charts2json.c b/web/api/formatters/charts2json.c
index 2ad068d892..61086ab635 100644
--- a/web/api/formatters/charts2json.c
+++ b/web/api/formatters/charts2json.c
@@ -36,7 +36,7 @@ const char* get_release_channel() {
return (use_stable)?"stable":"nightly";
}
-void charts2json(RRDHOST *host, BUFFER *wb, int skip_volatile, int show_archived) {
+void charts2json(RRDHOST *host, BUFFER *wb, int skip_volatile) {
static char *custom_dashboard_info_js_filename = NULL;
size_t c, dimensions = 0, memory = 0, alarms = 0;
RRDSET *st;
@@ -70,7 +70,7 @@ void charts2json(RRDHOST *host, BUFFER *wb, int skip_volatile, int show_archived
c = 0;
rrdset_foreach_read(st, host) {
- if ((!show_archived && rrdset_is_available_for_viewers(st)) || (show_archived && rrdset_is_archived(st))) {
+ if (rrdset_is_available_for_viewers(st)) {
if(c) buffer_strcat(wb, ",");
buffer_strcat(wb, "\n\t\t\"");
buffer_strcat(wb, rrdset_id(st));
diff --git a/web/api/formatters/charts2json.h b/web/api/formatters/charts2json.h
index 96720d4b4c..4ef6bc2c80 100644
--- a/web/api/formatters/charts2json.h
+++ b/web/api/formatters/charts2json.h
@@ -5,7 +5,7 @@
#include "rrd2json.h"
-void charts2json(RRDHOST *host, BUFFER *wb, int skip_volatile, int show_archived);
+void charts2json(RRDHOST *host, BUFFER *wb, int skip_volatile);
const char* get_release_channel();
#endif //NETDATA_API_FORMATTER_CHARTS2JSON_H
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index a250c5d233..0045246f0d 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -644,7 +644,7 @@ inline int web_client_api_request_v1_charts(RRDHOST *host, struct web_client *w,
buffer_flush(w->response.data);
w->response.data->content_type = CT_APPLICATION_JSON;
- charts2json(host, w->response.data, 0, 0);
+ charts2json(host, w->response.data, 0);
return HTTP_RESP_OK;
}