From 1e49040d3e0f66f886f921361db3847ab6e93c7a Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Thu, 11 Jan 2018 17:48:59 +0100 Subject: [PATCH] Return statstics for process --- src/rest_interface.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rest_interface.cpp b/src/rest_interface.cpp index cdb8e67..10ff541 100644 --- a/src/rest_interface.cpp +++ b/src/rest_interface.cpp @@ -48,9 +48,11 @@ void start_rest_api(WriterManager& writer_manager, uint16_t port) CROW_ROUTE (app, "/statistics") ([&](){ crow::json::wvalue result; - // for (const auto& item : writer_manager.get_statistics()) { - // result[item.first] = item.second; - // } + for (const auto& item : writer_manager.get_statistics()) { + result[item.first] = item.second; + } + + result["status"] = writer_manager.get_status(); return result; });