Report failures where the operator can still see them

The 55 alert() calls carried the same suppression as the confirms, and go wrong in the worse
direction: a silenced confirm makes a button do nothing, while a silenced alert lets the action
run and says nothing about it failing. vvAlert returns a promise nobody has to await, so these
converted by rename with no caller becoming async. The icon is inferred from the message rather
than asked of fifty call sites, and an explicit type still wins.
This commit is contained in:
Gmer4Lfe
2026-08-09 21:47:23 -04:00
parent 7d865b0a09
commit e4423200cc
7 changed files with 69 additions and 57 deletions
+2 -2
View File
@@ -2636,14 +2636,14 @@ async function vvDockerAction(action, name, webui) {
// The endpoint reports refusals as ok:false with a reason — container not found, a non-zero
// docker exit. Discarding that made a failed stop look exactly like a successful one, since
// the card it would have changed is redrawn from a payload either way.
if (!d || !d.ok) alert('Container ' + action + ' failed: ' + ((d && (d.error || d.output)) || 'unknown error'));
if (!d || !d.ok) vvAlert('Container ' + action + ' failed: ' + ((d && (d.error || d.output)) || 'unknown error'));
vvDfActive = null;
// The endpoint drops the monitor cache on success, and this poll asks for a live collection
// besides — either alone is enough, but between them the card cannot redraw itself from a
// payload assembled before the action happened.
setTimeout(() => vvPollMonitor(true), 1500);
})
.catch(() => alert('Container ' + action + ' failed: request error'));
.catch(() => vvAlert('Container ' + action + ' failed: request error'));
}
function vvRenderDockerFolders(data) {