18978: Disable webshell idle timeout when 0. 18978-webshell-timeout-ux
authorStephen Smith <stephen@curii.com>
Mon, 25 Apr 2022 19:55:02 +0000 (15:55 -0400)
committerStephen Smith <stephen@curii.com>
Mon, 25 Apr 2022 19:55:02 +0000 (15:55 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

public/webshell/index.html

index 5e3f32e46af0e21d0499925a006966dbb787a4b3..aae70a97afab13a30a553eb2a6196d2a074f9484 100644 (file)
              sh.keysPressed(token + "\n");
              sh.vt100('(sent authentication token)\n');
              token = null;
-             updateIdleTimer();
-             document.body.onmousemove = updateIdleTimer;
-             document.body.onkeydown = updateIdleTimer;
-             setTimeout(checkIdleTimer, 1000);
+             if (timeout > 0) {
+               updateIdleTimer();
+               document.body.onmousemove = updateIdleTimer;
+               document.body.onkeydown = updateIdleTimer;
+               setTimeout(checkIdleTimer, 1000);
+             }
           } else {
             setTimeout(trySendToken, 200);
           }