summaryrefslogtreecommitdiffstats
path: root/app/server-control/controllers/remote-console-window-controller.js
diff options
context:
space:
mode:
authorIftekharul Islam <iffy.ryan@ibm.com>2017-09-06 10:04:14 -0500
committerAdriana Kobylak <anoo@us.ibm.com>2017-10-09 14:44:39 -0500
commitc22425f2788650a25a2db1c92f7bc8f43141a496 (patch)
tree34157df3b1624501b86089ea4f8f1fef4636e99c /app/server-control/controllers/remote-console-window-controller.js
parent06054b6f481d69ae71ab06de7073d4653b118b1d (diff)
downloadphosphor-webui-c22425f2788650a25a2db1c92f7bc8f43141a496.tar.gz
phosphor-webui-c22425f2788650a25a2db1c92f7bc8f43141a496.zip
Server health icon status on header fixed
Change-Id: I06100d8ffe9e26129585ca9476fa7097ef34a6b4 Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
Diffstat (limited to 'app/server-control/controllers/remote-console-window-controller.js')
-rw-r--r--app/server-control/controllers/remote-console-window-controller.js64
1 files changed, 64 insertions, 0 deletions
diff --git a/app/server-control/controllers/remote-console-window-controller.js b/app/server-control/controllers/remote-console-window-controller.js
new file mode 100644
index 0000000..cb2835d
--- /dev/null
+++ b/app/server-control/controllers/remote-console-window-controller.js
@@ -0,0 +1,64 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverControl
+ * @exports remoteConsoleWindowController
+ * @name remoteConsoleController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverControl')
+ .controller('remoteConsoleWindowController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ dataService.showNavigation = false;
+
+ // See https://github.com/macton/hterm for available hterm options
+
+ //Storage
+ hterm.defaultStorage = new lib.Storage.Local();
+
+ var term = new hterm.Terminal("foo");
+ term.onTerminalReady = function() {
+ var io = term.io.push();
+ io.onVTKeystroke = function(str) {
+ console.log(str)
+ term.io.print(str);
+ };
+ io.sendString = function(str) {
+ console.log(str)
+ };
+ };
+ term.decorate(document.querySelector('#terminal'));
+
+ //Set cursor color
+ term.prefs_.set('cursor-color', 'rgba(83, 146, 255, .5)');
+
+ //Set background color
+ term.prefs_.set('background-color', '#19273c');
+
+ //Print to console window
+ term.io.println('OpenBMC ver.00');
+ term.io.println('This is not an actual live connection.');
+ term.io.print('root@IBM:');
+
+ //Allows keyboard input
+ term.installKeyboard();
+
+ $scope.close = function(){
+ dataService.setRemoteWindowInactive();
+ $window.close();
+ }
+ }
+ ]
+ );
+
+})(angular);
OpenPOWER on IntegriCloud