добавил получение sysinfo и вывод аптайма в веб-морде

This commit is contained in:
2025-01-09 12:02:42 +03:00
parent ab654a754c
commit 20cf08e2a1
5 changed files with 78 additions and 0 deletions

View File

@@ -206,6 +206,8 @@ public:
rep.headers.push_back({.name = "Content-Type", .value = toString(mime_types::json)});
std::string result = R"({"mainState":)";
result += api->loadTerminalState();
result += R"(,"sysinfo":)";
result += api->loadSysInfo();
result += "}";
rep.content.insert(rep.content.end(), result.c_str(), result.c_str() + result.size());
}));