maxpool 1.24.40 → 1.24.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tui.js +23 -0
package/package.json
CHANGED
package/src/tui.js
CHANGED
|
@@ -751,6 +751,25 @@ export class TUI {
|
|
|
751
751
|
return parts.join(' ');
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
+
/** ` People max 120 · ahmed 40 · andrey 7` — requests per person since start.
|
|
755
|
+
* Merges this pool's named callers with every linked team pool's callers (the
|
|
756
|
+
* cloud's view of who used it). '' when nobody named has used the pool. */
|
|
757
|
+
_peopleLine(W = 80) {
|
|
758
|
+
const totals = new Map();
|
|
759
|
+
for (const [n, c] of this.am.callerCounts || []) totals.set(n, (totals.get(n) || 0) + c);
|
|
760
|
+
for (const l of this.am.poolLinks || []) {
|
|
761
|
+
for (const [n, v] of Object.entries(l.status?.callers || {})) {
|
|
762
|
+
totals.set(n, Math.max(totals.get(n) || 0, v?.requests || 0));
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
totals.delete('legacy-key');
|
|
766
|
+
if (!totals.size) return '';
|
|
767
|
+
const parts = [...totals.entries()].sort((x, y) => y[1] - x[1])
|
|
768
|
+
.map(([n, c]) => `${n} ${cyan(String(c))}`);
|
|
769
|
+
const line = ` People ${parts.join(dim(' · '))}`;
|
|
770
|
+
return vw(line) > W ? line.slice(0, W) : line;
|
|
771
|
+
}
|
|
772
|
+
|
|
754
773
|
_routingLine(routing, xpText) {
|
|
755
774
|
return ` Routing ${cyan(routing)}${xpText}`;
|
|
756
775
|
}
|
|
@@ -1848,6 +1867,10 @@ export class TUI {
|
|
|
1848
1867
|
const right = `Port ${port} ${green('▲')} `;
|
|
1849
1868
|
lines.push(left + ' '.repeat(Math.max(1, W - vw(left) - vw(right))) + right);
|
|
1850
1869
|
lines.push(' ' + dim('─'.repeat(W - 2)));
|
|
1870
|
+
// Usage by person (owner 2026-10-29: "the only thing missing is usage by person").
|
|
1871
|
+
// Local named callers + each linked team pool's callers, one compact line.
|
|
1872
|
+
const people = this._peopleLine(W);
|
|
1873
|
+
if (people) lines.push(people);
|
|
1851
1874
|
// Restart/reload in progress: admission is paused while active requests drain, then
|
|
1852
1875
|
// the process swaps. Without live feedback the screen looks FROZEN (identical
|
|
1853
1876
|
// dashboard, nothing moving) from R→Yes until the swap — the reported bug. Show an
|