diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2023-07-03 16:40:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 16:40:17 +0300 |
commit | 6dd2fc735ad37165de442893109cc5a33bc83522 (patch) | |
tree | 65d721f9aa3ca8921563d0c2859346b3e47d9832 /aclk/schema-wrappers | |
parent | 52ac7b0f1a2de17feeb2613d2a32a6aa17429cbc (diff) |
Send alert chart labels config key to cloud (#15283)
* add chart_labels to alert_hash
* store chart_labels in alert_hash
* transmit to cloud
Diffstat (limited to 'aclk/schema-wrappers')
-rw-r--r-- | aclk/schema-wrappers/alarm_config.cc | 5 | ||||
-rw-r--r-- | aclk/schema-wrappers/alarm_config.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/aclk/schema-wrappers/alarm_config.cc b/aclk/schema-wrappers/alarm_config.cc index 56d7e6f39f..fe0b0517cf 100644 --- a/aclk/schema-wrappers/alarm_config.cc +++ b/aclk/schema-wrappers/alarm_config.cc @@ -48,6 +48,8 @@ void destroy_aclk_alarm_configuration(struct aclk_alarm_configuration *cfg) freez(cfg->p_db_lookup_dimensions); freez(cfg->p_db_lookup_method); freez(cfg->p_db_lookup_options); + + freez(cfg->chart_labels); } char *generate_provide_alarm_configuration(size_t *len, struct provide_alarm_configuration *data) @@ -127,6 +129,9 @@ char *generate_provide_alarm_configuration(size_t *len, struct provide_alarm_con cfg->set_p_db_lookup_options(data->cfg.p_db_lookup_options); cfg->set_p_update_every(data->cfg.p_update_every); + if (data->cfg.chart_labels) + cfg->set_chart_labels(data->cfg.chart_labels); + *len = PROTO_COMPAT_MSG_SIZE(msg); char *bin = (char*)mallocz(*len); if (!msg.SerializeToArray(bin, *len)) diff --git a/aclk/schema-wrappers/alarm_config.h b/aclk/schema-wrappers/alarm_config.h index 157fbc60f0..4eaa4fd708 100644 --- a/aclk/schema-wrappers/alarm_config.h +++ b/aclk/schema-wrappers/alarm_config.h @@ -50,6 +50,8 @@ struct aclk_alarm_configuration { char *p_db_lookup_method; char *p_db_lookup_options; int32_t p_update_every; + + char *chart_labels; }; void destroy_aclk_alarm_configuration(struct aclk_alarm_configuration *cfg); |