@cryptotaxi247 / netdata-1 / commits / 4f5228e65

add add summary linking to alert instances (ati) when options=summary,values is requested (#15317)

Costa Tsaousis committed Jul 6, 2023 at 17:18 UTC 4f5228e65463cf680d2ec3fedaf71c813d69309b
1 file changed +3 -3
database/contexts/api_v2.c
+3 -3
@@ -1290,10 +1290,10 @@ static int contexts_v2_alert_instance_to_json_callback(const DICTIONARY_ITEM *it
1290 buffer_json_member_add_string(wb, "nm", string2str(t->name));
1291 buffer_json_member_add_string(wb, "ch", string2str(t->chart_name));
1292
1293 - if(ctl->request->options & CONTEXT_V2_OPTION_ALERTS_WITH_INSTANCES) {
1294 - if(ctl->request->options & CONTEXT_V2_OPTION_ALERTS_WITH_SUMMARY)
1295 - buffer_json_member_add_uint64(wb, "ati", t->ati);
1293 + if(ctl->request->options & CONTEXT_V2_OPTION_ALERTS_WITH_SUMMARY)
1294 + buffer_json_member_add_uint64(wb, "ati", t->ati);
1295
1296 + if(ctl->request->options & CONTEXT_V2_OPTION_ALERTS_WITH_INSTANCES) {
1297 buffer_json_member_add_string(wb, "units", string2str(t->units));
1298 buffer_json_member_add_string(wb, "fami", string2str(t->family));
1299 buffer_json_member_add_string(wb, "info", string2str(t->info));