diff --git a/CMakeLists.txt b/CMakeLists.txt index 552f3d76..ea561567 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ endif() # Define project project(Monitoring - VERSION 3.19.3 + VERSION 3.19.5 DESCRIPTION "O2 Monitoring library" LANGUAGES CXX ) diff --git a/examples/15-ODC.cxx b/examples/15-ODC.cxx index 6a9491bf..8ade4740 100644 --- a/examples/15-ODC.cxx +++ b/examples/15-ODC.cxx @@ -54,9 +54,9 @@ void httpServer(tcp::acceptor& acceptor, tcp::socket& socket) { response.set(http::field::content_type, "application/json"); beast::ostream(response.body()) << R"({"results":[{"statement_id":0,"series":[{"name":"measurements","columns":["name"],"values":[["odc"]]}]}]}\n)"; }); - connection->addCallback("SHOW+TAG+VALUES+FROM+calibs+WHERE+partitionid", + connection->addCallback("SHOW+TAG+VALUES+FROM+calibs+WITH+KEY", [](http::request& request, http::response& response) { - std::string jsonPrefix = R"({"results": [{"statement_id": 0, "series": [{"name": "odc_calibs", "columns": ["key", "value"], "values": [)"; + std::string jsonPrefix = R"({"results": [{"statement_id": 0, "series": [{"name": "odc_calibs", "columns": ["value"], "values": [)"; std::string jsonSuffix = R"(]}]}]})"; response.set(http::field::content_type, "application/json"); std::string calibJson; @@ -64,7 +64,7 @@ void httpServer(tcp::acceptor& acceptor, tcp::socket& socket) { const std::lock_guard lock(gMapAccess); if (gStats.find(id) != gStats.end()) { for (auto const& calib : gStats.at(id).TasksPerCalib) { - calibJson += "[\"calib\", \"" + calib.first + "\"],"; + calibJson += "[\"" + calib.first + "\"],"; } } if (!calibJson.empty()) {