summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2020-10-06 12:58:55 +0300
committerGitHub <noreply@github.com>2020-10-06 12:58:55 +0300
commitce79c3d7a8f2c7a1cd9d853d1397023e745e03ed (patch)
tree6de26d280a35325016e174e5806e727b32320afa /web
parentbc1fa29ec33f492cf27f709b24c5fc5bf952881b (diff)
Fixed the data endpoint to prioritize chart over context if both are present (#10032)
Diffstat (limited to 'web')
-rw-r--r--web/api/web_api_v1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index ecedf4bc2c..4f10a681e7 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -492,7 +492,7 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c
}
struct context_param *context_param_list = NULL;
- if (context) {
+ if (context && !chart) {
RRDSET *st1;
uint32_t context_hash = simple_hash(context);
rrdhost_rdlock(localhost);
@@ -513,7 +513,7 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c
}
if (!st && !context_param_list) {
- if (context) {
+ if (context && !chart) {
buffer_strcat(w->response.data, "Context is not found: ");
buffer_strcat_htmlescape(w->response.data, context);
}