Some changes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user