summaryrefslogtreecommitdiffstats
path: root/app/common
diff options
context:
space:
mode:
authorKuiying Wang <kuiying.wang@intel.com>2019-08-26 15:56:10 +0800
committerGunnar Mills <gmills@us.ibm.com>2019-09-04 20:20:08 +0000
commitf4a43cca440535a63592877c9bdbbe28636d803c (patch)
treeacae776a6b5dfc535a36caa33b953e32d9df12c1 /app/common
parentfa8697b330ab85059f959daa9535f887a578a2c1 (diff)
downloadphosphor-webui-f4a43cca440535a63592877c9bdbbe28636d803c.tar.gz
phosphor-webui-f4a43cca440535a63592877c9bdbbe28636d803c.zip
Fix issue on IE cannot open SOL page
The root cause is that TextEncoder/TextDecoder does not support IE More detail at https://caniuse.com/#feat=textencoder One workable solution is to include text-encoder lib, as this patch did. Tested: IE visit BMC and navigate to "#/server-control/remote-console" SOL page is working well. Change-Id: I5019c626afcf67916252db4115af7616c7a9759b Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Diffstat (limited to 'app/common')
-rw-r--r--app/common/directives/serial-console.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/common/directives/serial-console.js b/app/common/directives/serial-console.js
index 27917a5..045503d 100644
--- a/app/common/directives/serial-console.js
+++ b/app/common/directives/serial-console.js
@@ -35,6 +35,16 @@ function measureChar(term) {
return rect;
}
+/*
+TextEncoder/TextDecoder does not support IE.
+Use text-encoding instead in IE
+More detail at https://caniuse.com/#feat=textencoder
+*/
+import {TextDecoder} from 'text-encoding';
+if (!window['TextDecoder']) {
+ window['TextDecoder'] = TextDecoder;
+}
+
window.angular && (function(angular) {
'use strict';
OpenPOWER on IntegriCloud