Skip to content

Commit 7ce041a

Browse files
committed
update diagnostic overlay
1 parent e39597d commit 7ce041a

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

src/SIL.XForge.Scripture/ClientApp/src/app/shared/diagnostic-overlay/diagnostic-overlay.component.html

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2>Developer Diagnostics</h2>
2323
<span (click)="tab = 1" [class.active]="tab === 1">Loading</span>
2424
<span (click)="tab = 2" [class.active]="tab === 2">Digest cycles</span>
2525
</div>
26-
<div>
26+
<div class="tab-content">
2727
@if (tab === 0) {
2828
<h3>{{ totalDocsCount | l10nNumber }} documents tracked by realtime service</h3>
2929
<table>
@@ -32,7 +32,7 @@ <h3>{{ totalDocsCount | l10nNumber }} documents tracked by realtime service</h3>
3232
<th>Collection</th>
3333
<th>Docs</th>
3434
<th>Subscribers</th>
35-
<th>Queries</th>
35+
<th>Active Subs</th>
3636
</tr>
3737
</thead>
3838
<tbody>
@@ -41,12 +41,57 @@ <h3>{{ totalDocsCount | l10nNumber }} documents tracked by realtime service</h3>
4141
<td>{{ docType.key }}</td>
4242
<td>{{ docType.value.docs | l10nNumber }}</td>
4343
<td>{{ docType.value.subscribers | l10nNumber }}</td>
44-
<td>{{ docType.value.queries | l10nNumber }}</td>
44+
<td>{{ docType.value.activeDocSubscriptionsCount | l10nNumber }}</td>
45+
</tr>
46+
}
47+
</tbody>
48+
</table>
49+
50+
<h3>Realtime doc subscribers</h3>
51+
<table>
52+
<thead>
53+
<tr>
54+
<th>Collection</th>
55+
<th>Context</th>
56+
<th>Subs</th>
57+
<th>Active</th>
58+
</tr>
59+
</thead>
60+
<tbody>
61+
@for (collection of subscriberCountsByContext | keyvalue; track collection.key) {
62+
@for (doc of collection.value | keyvalue; track doc.key; let first = $first; let count = $count) {
63+
<tr>
64+
@if (first) {
65+
<th [attr.rowspan]="count">{{ collection.key }}</th>
66+
}
67+
<td>{{ doc.key }}</td>
68+
<td>{{ doc.value.all | l10nNumber }}</td>
69+
<td>{{ doc.value.active | l10nNumber }}</td>
70+
</tr>
71+
}
72+
}
73+
</tbody>
74+
</table>
75+
76+
<h3>Realtime queries</h3>
77+
<table>
78+
<thead>
79+
<tr>
80+
<th>Collection</th>
81+
<th>Queries</th>
82+
</tr>
83+
</thead>
84+
<tbody>
85+
@for (docType of queriesByCollection | keyvalue; track docType.key) {
86+
<tr>
87+
<td>{{ docType.key }}</td>
88+
<td>{{ docType.value | l10nNumber }}</td>
4589
</tr>
4690
}
4791
</tbody>
4892
</table>
4993
<h3>Blank page</h3>
94+
5095
<a appRouterLink="/blank-page">Go to blank page</a> (for testing subscriber cleanup)
5196
} @else if (tab === 1) {
5297
<h3>Components affecting loading indicator</h3>

src/SIL.XForge.Scripture/ClientApp/src/app/shared/diagnostic-overlay/diagnostic-overlay.component.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ $table-border-color: #404040;
1111
color: $foreground-color;
1212

1313
font-size: 12px;
14-
overflow-y: auto;
14+
max-height: calc(100vh - 56px);
1515
}
1616

1717
.wrapper:not(.collapsed) {
18-
width: 25vw;
19-
min-width: 380px;
18+
display: flex;
19+
flex-direction: column;
20+
max-height: 100%;
2021
}
2122

2223
.wrapper.collapsed {
@@ -77,6 +78,12 @@ h3 {
7778
.nav-and-content-wrapper {
7879
display: flex;
7980
gap: 8px;
81+
overflow: hidden;
82+
}
83+
84+
.tab-content {
85+
overflow: auto;
86+
padding: 8px;
8087
}
8188

8289
.nav-wrapper {

0 commit comments

Comments
 (0)