Update KVM layout and add open in new window functionality

-Adds heading with new layout consistency class name
-Adds open in new window functionality

Resolves: openbmc/phosphor-webui#81

Tested on a Witherspoon with power on and with build
that allows up to 4 kvm sessions connected
at a time https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/25231.

KVM console loads in firefox, chrome, safari, edge and IE11.
Opening new window and returning to parent window is
functional across all browsers.

Signed-off-by: Dixsie Wolmers <dixsiew@gmail.com>
Change-Id: I32cda025bdd459740ca2b42d573b431fac687860
diff --git a/app/server-control/directives/kvm-console.html b/app/server-control/directives/kvm-console.html
index 40e4d97..0b5f5d9 100644
--- a/app/server-control/directives/kvm-console.html
+++ b/app/server-control/directives/kvm-console.html
@@ -1,5 +1,13 @@
 <div id="noVNC_container">
-    <div id="noVNC_status_bar">
-        <div id="noVNC_left_dummy_elem"></div>
-    </div>
+  <div id="noVNC_status_bar">
+    <div id="noVNC_left_dummy_elem"></div>
+  </div>
+</div>
+<div class="kvm__actions float-right">
+  <button
+    class="btn  btn-tertiary"
+    ng-click="openWindow()"
+    ng-show="newWindowBtn === true">
+    <icon file="icon-launch.svg" aria-hidden="true"></icon>Open in new window
+  </button>
 </div>
diff --git a/app/server-control/directives/kvm-console.js b/app/server-control/directives/kvm-console.js
index 224e5d2..913990d 100644
--- a/app/server-control/directives/kvm-console.js
+++ b/app/server-control/directives/kvm-console.js
@@ -16,7 +16,7 @@
     function($log, $location) {
       return {
         restrict: 'E', template: require('./kvm-console.html'),
-            link: function(scope, element) {
+            scope: {newWindowBtn: '=?'}, link: function(scope, element) {
               var rfb;
 
               element.on('$destroy', function() {
@@ -33,6 +33,7 @@
               function connected(e) {
                 $log.debug('RFB Connected');
               }
+
               function disconnected(e) {
                 $log.debug('RFB disconnected');
               }
@@ -53,6 +54,12 @@
                     'Unable to create RFB client -- ' + exc);
                 return;  // don't continue trying to connect
               };
+
+              scope.openWindow = function() {
+                window.open(
+                    '#/server-control/kvm-window', 'Kvm Window',
+                    'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1125,height=900');
+              };
             }
       }
     }