feat: Enhance RelayHub component with subscription count details (still not working)
- Update RelayHubStatus.vue to display both local and global subscription counts, improving user visibility into active subscriptions. - Add totalSubscriptionCount computed property in useRelayHub.ts to track the total number of subscriptions. - Implement totalSubscriptionCount getter in relayHub.ts to return the size of the subscriptions map. - Include debug logging in relayHub.ts for connected relay counts and statuses to aid in troubleshooting.
This commit is contained in:
parent
356f42d209
commit
36e9694c1b
5 changed files with 26 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ export function useRelayHub() {
|
|||
// Computed properties
|
||||
const connectedRelayCount = computed(() => relayHub.connectedRelayCount)
|
||||
const totalRelayCount = computed(() => relayHub.totalRelayCount)
|
||||
const totalSubscriptionCount = computed(() => relayHub.totalSubscriptionCount)
|
||||
const connectionHealth = computed(() => {
|
||||
if (totalRelayCount.value === 0) return 0
|
||||
return (connectedRelayCount.value / totalRelayCount.value) * 100
|
||||
|
|
@ -250,6 +251,7 @@ export function useRelayHub() {
|
|||
// Computed
|
||||
connectedRelayCount,
|
||||
totalRelayCount,
|
||||
totalSubscriptionCount,
|
||||
connectionHealth,
|
||||
|
||||
// Methods
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue