From: Stephen Smith Date: Mon, 25 Apr 2022 17:15:41 +0000 (-0400) Subject: 18978: Display idletimeout setting in webshell timeout message. X-Git-Tag: 2.4.1~1^2~5^2~1 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/70d7d9736369c173db2e3ab8ab98add0c0f3bd1e 18978: Display idletimeout setting in webshell timeout message. Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/public/webshell/index.html b/public/webshell/index.html index 028664c4..5e3f32e4 100644 --- a/public/webshell/index.html +++ b/public/webshell/index.html @@ -60,7 +60,7 @@ if (currentTime - lastTime > idleTimeoutMs) { //logout sh.reset(); - sh.sessionClosed(); + sh.sessionClosed("Session timed out after " + timeout + " seconds."); document.body.onmousemove = undefined; document.body.onkeydown = undefined; } else { diff --git a/public/webshell/shell_in_a_box.js b/public/webshell/shell_in_a_box.js index c258b5d7..6b0a5b69 100644 --- a/public/webshell/shell_in_a_box.js +++ b/public/webshell/shell_in_a_box.js @@ -128,7 +128,7 @@ function ShellInABox(url, container) { }; extend(ShellInABox, VT100); -ShellInABox.prototype.sessionClosed = function() { +ShellInABox.prototype.sessionClosed = function(msg) { try { this.connected = false; if (this.session) { @@ -136,7 +136,7 @@ ShellInABox.prototype.sessionClosed = function() { if (this.cursorX > 0) { this.vt100('\r\n'); } - this.vt100('Session closed.'); + this.vt100(msg || 'Session closed.'); this.currentRequest.abort(); } // Revealing the "reconnect" button is commented out until we hook