From a8b451b5ee2c750191163c3716e3669efee035f0 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Tue, 5 Nov 2024 16:20:35 -0500 Subject: [PATCH] add count of data for affiliations and peer list; --- src/sysview/AffListWnd.h | 7 +++++++ src/sysview/PeerListWnd.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/sysview/AffListWnd.h b/src/sysview/AffListWnd.h index 6ec5137b..93a4a580 100644 --- a/src/sysview/AffListWnd.h +++ b/src/sysview/AffListWnd.h @@ -110,6 +110,7 @@ public: m_listView.clear(); json::array fneAffils = rsp["affiliations"].get(); + uint32_t cnt = 0U; for (auto entry : fneAffils) { json::object peerAffils = entry.get(); uint32_t peerId = peerAffils["peerId"].getDefault(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()); diff --git a/src/sysview/PeerListWnd.h b/src/sysview/PeerListWnd.h index 2f0f51aa..cf626e01 100644 --- a/src/sysview/PeerListWnd.h +++ b/src/sysview/PeerListWnd.h @@ -110,6 +110,7 @@ public: m_listView.clear(); json::array fnePeers = rsp["peers"].get(); + uint32_t cnt = 0U; for (auto entry : fnePeers) { json::object peerObj = entry.get(); uint32_t peerId = peerObj["peerId"].getDefault(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());