Skip to content

Commit fcfe139

Browse files
authored
Merge pull request #354 from sy-c/dev
v3.19.5
2 parents 19b6690 + 8404dcd commit fcfe139

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif()
3131

3232
# Define project
3333
project(Monitoring
34-
VERSION 3.19.3
34+
VERSION 3.19.5
3535
DESCRIPTION "O2 Monitoring library"
3636
LANGUAGES CXX
3737
)

examples/15-ODC.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)