mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
fix: bump UI on failure=null to clear n/a when server is idle
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@troed/oc-ls-stats",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.10",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./tui": {
|
||||
|
||||
@@ -313,6 +313,7 @@ const tui: TuiPlugin = async (api) => {
|
||||
continue
|
||||
}
|
||||
tracker.failure = null
|
||||
bump()
|
||||
|
||||
debug(`poll baseUrl=${baseUrl} slots=${JSON.stringify(slotList)}`)
|
||||
|
||||
@@ -324,7 +325,13 @@ const tui: TuiPlugin = async (api) => {
|
||||
|
||||
for (const slotId of prevProcessingSlotIds) {
|
||||
if (!currProcessingSlotIds.has(slotId)) {
|
||||
delete tracker.prevNdBySlot[slotId]
|
||||
const prev = tracker.prevNdBySlot[slotId]
|
||||
if (prev) {
|
||||
prev.hasIncreased = false
|
||||
prev.baseline = 0
|
||||
} else {
|
||||
delete tracker.prevNdBySlot[slotId]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user