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>
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 @@
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';