summaryrefslogtreecommitdiffstats
path: root/database/rrddim.c
diff options
context:
space:
mode:
authorAndrew Moss <1043609+amoss@users.noreply.github.com>2020-03-31 21:19:34 +0200
committerGitHub <noreply@github.com>2020-03-31 21:19:34 +0200
commit8fe7485a600f60be9ac20af923a61d516cb0335e (patch)
tree875658393d501b764eb8694d44488dbe9b64cf29 /database/rrddim.c
parentef2bd3956b2797de31008ddffab671b9675f070d (diff)
Switching over to soft feature flag (#8545)
Preparing for the cloud release. This changes how we handle the feature flag so that it no longer requires installer switches and can be set from the config file. This still requires internal access to use and is not ready for public access yet.
Diffstat (limited to 'database/rrddim.c')
-rw-r--r--database/rrddim.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/database/rrddim.c b/database/rrddim.c
index 11f43ab321..3e94021e78 100644
--- a/database/rrddim.c
+++ b/database/rrddim.c
@@ -184,7 +184,8 @@ void rrdcalc_link_to_rrddim(RRDDIM *rd, RRDSET *st, RRDHOST *host) {
}
}
#ifdef ENABLE_ACLK
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
#endif
}
@@ -428,7 +429,8 @@ RRDDIM *rrddim_add_custom(RRDSET *st, const char *id, const char *name, collecte
}
rrdset_unlock(st);
#ifdef ENABLE_ACLK
- aclk_update_chart(host, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(host, st->id, ACLK_CMD_CHART);
#endif
return(rd);
}
@@ -484,7 +486,8 @@ void rrddim_free(RRDSET *st, RRDDIM *rd)
break;
}
#ifdef ENABLE_ACLK
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
#endif
}
@@ -505,7 +508,8 @@ int rrddim_hide(RRDSET *st, const char *id) {
rrddim_flag_set(rd, RRDDIM_FLAG_HIDDEN);
#ifdef ENABLE_ACLK
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
#endif
return 0;
}
@@ -522,7 +526,8 @@ int rrddim_unhide(RRDSET *st, const char *id) {
rrddim_flag_clear(rd, RRDDIM_FLAG_HIDDEN);
#ifdef ENABLE_ACLK
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
#endif
return 0;
}
@@ -533,7 +538,8 @@ inline void rrddim_is_obsolete(RRDSET *st, RRDDIM *rd) {
rrddim_flag_set(rd, RRDDIM_FLAG_OBSOLETE);
rrdset_flag_set(st, RRDSET_FLAG_OBSOLETE_DIMENSIONS);
#ifdef ENABLE_ACLK
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
#endif
}
@@ -542,7 +548,8 @@ inline void rrddim_isnot_obsolete(RRDSET *st __maybe_unused, RRDDIM *rd) {
rrddim_flag_clear(rd, RRDDIM_FLAG_OBSOLETE);
#ifdef ENABLE_ACLK
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
+ if (netdata_cloud_setting)
+ aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHART);
#endif
}