@@ -54,17 +54,17 @@ void httpServer(tcp::acceptor& acceptor, tcp::socket& socket) {
5454 response.set (http::field::content_type, " application/json" );
5555 beast::ostream (response.body ()) << R"( {"results":[{"statement_id":0,"series":[{"name":"measurements","columns":["name"],"values":[["odc"]]}]}]}\n)" ;
5656 });
57- connection->addCallback (" SHOW+TAG+VALUES+FROM+calibs+WHERE+partitionid " ,
57+ connection->addCallback (" SHOW+TAG+VALUES+FROM+calibs+WITH+KEY " ,
5858 [](http::request<http::dynamic_body>& request, http::response<http::dynamic_body>& response) {
59- std::string jsonPrefix = R"( {"results": [{"statement_id": 0, "series": [{"name": "odc_calibs", "columns": ["key", " value"], "values": [)" ;
59+ std::string jsonPrefix = R"( {"results": [{"statement_id": 0, "series": [{"name": "odc_calibs", "columns": ["value"], "values": [)" ;
6060 std::string jsonSuffix = R"( ]}]}]})" ;
6161 response.set (http::field::content_type, " application/json" );
6262 std::string calibJson;
6363 std::string id = std::string (request.target ().substr (request.target ().find (" WHERE+partitionid+%3D+" ) + 22 ));
6464 const std::lock_guard<std::mutex> lock (gMapAccess );
6565 if (gStats .find (id) != gStats .end ()) {
6666 for (auto const & calib : gStats .at (id).TasksPerCalib ) {
67- calibJson += " [\" calib \" , \" " + calib.first + " \" ]," ;
67+ calibJson += " [\" " + calib.first + " \" ]," ;
6868 }
6969 }
7070 if (!calibJson.empty ()) {
0 commit comments