}
status->set("sockets", sockets);
- status->set("dhcp-state": network_state_->toElement());
+ status->set("dhcp-state", network_state_->toElement());
return (createAnswer(CONTROL_RESULT_SUCCESS, status));
}
}
status->set("sockets", sockets);
- status->set("dhcp-state": network_state_->toElement());
+ status->set("dhcp-state", network_state_->toElement());
return (createAnswer(CONTROL_RESULT_SUCCESS, status));
}
result->set("disabled-by-db-connection", Element::create(disabled_by_db_connection_ != 0));
bool disabled_by_user = false;
ElementPtr local_origin = Element::createList();
- uint16_t local_count = 0;
ElementPtr remote_origin = Element::createList();
- uint16_t remote_count = 0;
for (auto const& origin : disabled_by_origin_) {
if (origin == NetworkState::USER_COMMAND) {
disabled_by_user = true;
}
if (origin >= NetworkState::HA_LOCAL_COMMAND && origin < NetworkState::HA_REMOTE_COMMAND) {
- local_origin->set(local_count++, Element::create(origin - NetworkState::HA_LOCAL_COMMAND));
+ local_origin->add(Element::create(origin - NetworkState::HA_LOCAL_COMMAND));
}
if (origin >= NetworkState::HA_REMOTE_COMMAND && origin < NetworkState::DB_CONNECTION) {
- remote_origin->set(remote_count++, Element::create(origin - NetworkState::HA_REMOTE_COMMAND));
+ remote_origin->add(Element::create(origin - NetworkState::HA_REMOTE_COMMAND));
}
}
result->set("disabled-by-user", Element::create(disabled_by_user));
" \"occurrences\": 501,",
" \"start-time\": \"2024-06-12 17:52:06.814884\",",
" \"total-duration-usecs\": 23951",
- " }",
- " ..",
- " ]",
+ " },",
+ " ...",
+ " ],",
" \"result-set-format\": false,",
" \"interval-width-secs\": 5,",
" \"timestamp\": \"2024-06-12 17:52:22.397233\"",
- " }",
- "\"result\": 0,",
- "\"text\": \"perfmon-get-all-durations: n found\"",
+ " },",
+ " \"result\": 0,",
+ " \"text\": \"perfmon-get-all-durations: n found\"",
"}",
"If result-set-format is true, the output will be as shown below:",
"{",
" \"occurences\",",
" \"min-duration-usecs\",",
" \"max-duration-usecs\",",
- " \"total-duration-usecs\"",
+ " \"total-duration-usecs\",",
" \"mean-duration-usecs\"",
" ],",
" \"rows\": [",
" 23951,",
" 47",
" ],",
- " ..",
+ " ...",
" ]",
- " }",
+ " },",
" \"result-set-format\": true,",
" \"interval-width-secs\": 5,",
" \"timestamp\": \"2024-06-12 17:52:22.397233\"",
- " }",
- "\"result\": 0,",
- "\"text\": \"perfmon-get-all-durations: n found\"",
+ " },",
+ " \"result\": 0,",
+ " \"text\": \"perfmon-get-all-durations: n found\"",
"}"
],
"support": [
" \"sockets\": {",
" \"errors\": [ <error received during the last attempt to open all sockets> ],",
" \"status\": <ready, retrying, or failed>",
+ " },",
+ " \"dhcp-state\": {",
+ " \"disabled-by-db-connection\": false,",
+ " \"disabled-by-local-command\": [],",
+ " \"disabled-by-remote-command\": [],",
+ " \"disabled-by-user\": false,",
+ " \"globally-disabled\": false",
" }",
" }",
"}"