add count of data for affiliations and peer list;

pull/75/head
Bryan Biedenkapp 1 year ago
parent 116953b62e
commit a8b451b5ee

@ -110,6 +110,7 @@ public:
m_listView.clear();
json::array fneAffils = rsp["affiliations"].get<json::array>();
uint32_t cnt = 0U;
for (auto entry : fneAffils) {
json::object peerAffils = entry.get<json::object>();
uint32_t peerId = peerAffils["peerId"].getDefault<uint32_t>(0U);
@ -140,8 +141,14 @@ public:
const finalcut::FStringList line(columns.cbegin(), columns.cend());
m_listView.insert(line);
cnt++;
}
}
std::ostringstream wndTitle;
wndTitle << "Affiliations View" << " [" << cnt << "] (10s)";
FDialog::setText(wndTitle.str());
}
catch (std::exception& e) {
::LogWarning(LOG_HOST, "[AFFVIEW] %s:%u, failed to properly handle affiliation request, %s", fneRESTAddress.c_str(), fneRESTPort, e.what());

@ -110,6 +110,7 @@ public:
m_listView.clear();
json::array fnePeers = rsp["peers"].get<json::array>();
uint32_t cnt = 0U;
for (auto entry : fnePeers) {
json::object peerObj = entry.get<json::object>();
uint32_t peerId = peerObj["peerId"].getDefault<uint32_t>(0U);
@ -214,7 +215,13 @@ public:
const finalcut::FStringList line(columns.cbegin(), columns.cend());
m_listView.insert(line);
cnt++;
}
std::ostringstream wndTitle;
wndTitle << "Peers View" << " [" << cnt << "] (10s)";
FDialog::setText(wndTitle.str());
}
catch (std::exception& e) {
::LogWarning(LOG_HOST, "[AFFVIEW] %s:%u, failed to properly handle peer query request, %s", fneRESTAddress.c_str(), fneRESTPort, e.what());

Loading…
Cancel
Save

Powered by TurnKey Linux.