From 70d7d9736369c173db2e3ab8ab98add0c0f3bd1e Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Mon, 25 Apr 2022 13:15:41 -0400 Subject: [PATCH] 18978: Display idletimeout setting in webshell timeout message. Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- public/webshell/index.html | 2 +- public/webshell/shell_in_a_box.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.30.2