From 7d20158b4b8bdc8c6e870bda139e2cf47f83747c Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 24 Oct 2016 13:36:05 +0200 Subject: [PATCH] Add missing log output for UI-specific errors Some UI errors and one warning didn't write to the log. We want all errors to be logged. --- app/ui.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/ui.js b/app/ui.js index f058f401..6a0d9dc8 100644 --- a/app/ui.js +++ b/app/ui.js @@ -385,7 +385,9 @@ var UI; UI.showStatus("Disconnected"); break; default: - UI.showStatus("Invalid state", 'error'); + msg = "Invalid UI state"; + Util.Error(msg); + UI.showStatus(msg, 'error'); break; } @@ -967,7 +969,9 @@ var UI; } if ((!host) || (!port)) { - UI.showStatus("Must set host and port", 'error'); + var msg = "Must set host and port"; + Util.Error(msg); + UI.showStatus(msg, 'error'); return; } @@ -1020,6 +1024,7 @@ var UI; if (typeof msg === 'undefined') { msg = "Password is required"; } + Util.Warning(msg); UI.showStatus(msg, "warning"); }, @@ -1231,7 +1236,10 @@ var UI; // The browser is IE and we are in fullscreen mode. // - We need to force clipping while in fullscreen since // scrollbars doesn't work. - UI.showStatus("Forcing clipping mode since scrollbars aren't supported by IE in fullscreen"); + var msg = "Forcing clipping mode since scrollbars aren't" + + "supported by IE in fullscreen"; + Util.Debug(msg); + UI.showStatus(msg); UI.rememberedClipSetting = UI.getSetting('clip'); UI.setViewClip(true); document.getElementById('noVNC_setting_clip').disabled = true;