Some changes

This commit is contained in:
WolverinDEV
2019-08-25 22:16:42 +02:00
parent 787f911b6f
commit 79f8c91157
17 changed files with 320 additions and 119 deletions
+8 -7
View File
@@ -462,13 +462,14 @@ bool WebStatistics::handle_message(const std::shared_ptr<license::web::WebStatis
response["history"]["end"] = duration_cast<milliseconds>(history->end.time_since_epoch()).count();
response["history"]["interval"] = duration_cast<milliseconds>(history->period).count();
int index = 0;
for(auto& element : history->statistics) {
response["history"]["data"][index]["instances"] = element->instance_online;
response["history"]["data"][index]["servers"] = element->servers_online;
response["history"]["data"][index]["clients"] = element->clients_online;
response["history"]["data"][index]["music"] = element->bots_online;
index++;
int index;
auto stats = history->statistics;
for(index = 0; index < stats->record_count; index++) {
response["history"]["data"][index]["instances"] = stats->history[index].instance_online;
response["history"]["data"][index]["servers"] = stats->history[index].servers_online;
response["history"]["data"][index]["clients"] = stats->history[index].clients_online;
response["history"]["data"][index]["music"] = stats->history[index].bots_online;
}
lock_guard lock(client->execute_lock);