summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2022-03-03 13:56:53 +0100
committerGitHub <noreply@github.com>2022-03-03 13:56:53 +0100
commitf0afc344fa7ddcd132fefb8fa1056dbb4294b227 (patch)
tree6e773ce83ed3562ee55014aa65ca9ec5b5efa9ef /web
parent62938c2e1d2caec624eec01a72cf98c2dd4f775f (diff)
adds node_id into mirrored_hosts list (#12307)
Diffstat (limited to 'web')
-rw-r--r--web/api/web_api_v1.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index 2cfd69dc83..054a716fac 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -886,11 +886,18 @@ static inline void web_client_api_request_v1_info_mirrored_hosts(BUFFER *wb) {
rrdhost_aclk_state_lock(host);
if (host->aclk_state.claimed_id)
- buffer_sprintf(wb, "\"%s\" }", host->aclk_state.claimed_id);
+ buffer_sprintf(wb, "\"%s\", ", host->aclk_state.claimed_id);
else
- buffer_strcat(wb, "null }");
+ buffer_strcat(wb, "null, ");
rrdhost_aclk_state_unlock(host);
+ if (host->node_id) {
+ char node_id_str[GUID_LEN + 1];
+ uuid_unparse_lower(*host->node_id, node_id_str);
+ buffer_sprintf(wb, "\"node_id\": \"%s\" }", node_id_str);
+ } else
+ buffer_strcat(wb, "\"node_id\": null }");
+
count++;
}
rrd_unlock();