UI: Handle idle state in scan polling
This commit is contained in:
parent
6082cf5bfd
commit
0856e733de
1 changed files with 6 additions and 1 deletions
|
|
@ -447,8 +447,13 @@
|
||||||
clearInterval(pollInterval);
|
clearInterval(pollInterval);
|
||||||
alert("Scan Error: " + state.results);
|
alert("Scan Error: " + state.results);
|
||||||
resetTables("Error: " + state.results);
|
resetTables("Error: " + state.results);
|
||||||
|
} else if (state.status === 'idle') {
|
||||||
|
// Scan state lost (server restart?)
|
||||||
|
clearInterval(pollInterval);
|
||||||
|
alert("Scan state lost (Server Restarted?). Please try again.");
|
||||||
|
resetTables("Scan stopped / State lost.");
|
||||||
}
|
}
|
||||||
// If 'scanning' or 'idle', keep polling...
|
// If 'scanning', keep polling...
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
clearInterval(pollInterval);
|
clearInterval(pollInterval);
|
||||||
console.error("Poll error", e);
|
console.error("Poll error", e);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue