]> git.proxmox.com Git - pmg-gui.git/commitdiff
ServerStatus.js: panel to view server status and console button
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 10 Mar 2017 06:58:41 +0000 (07:58 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 10 Mar 2017 06:58:41 +0000 (07:58 +0100)
js/Makefile
js/ServerAdministration.js
js/ServerStatus.js [new file with mode: 0644]
js/Utils.js

index 29814615da1d56f162fe20afd697436fae4b0322..b4a5633cc41a071f0f4bff7fcfe36d32983c3eaa 100644 (file)
@@ -1,6 +1,7 @@
 JSSRC=                                                         \
        Utils.js                                        \
        LoginWindow.js                                  \
+       ServerStatus.js                                 \
        ServerAdministration.js                         \
        ObjectGroupList.js                              \
        ObjectGroup.js                                  \
index 39ca50aa4ae8f80a79573ae92a36d4a041541bf7..c62daa2be169b73982a5894a74a7c68e50da3837 100644 (file)
@@ -8,6 +8,9 @@ Ext.define('PMG.ServerAdministration', {
     defaults: { border: false },
 
     items: [
+       {
+           xtype: 'pmgServerStatus'
+       },
        {
            xtype: 'proxmoxNodeServiceView',
             title: gettext('Services'),
diff --git a/js/ServerStatus.js b/js/ServerStatus.js
new file mode 100644 (file)
index 0000000..a5928af
--- /dev/null
@@ -0,0 +1,19 @@
+Ext.define('PMG.ServerStatus', {
+    extend: 'Ext.panel.Panel',
+    alias: 'widget.pmgServerStatus',
+
+    title: gettext('Status'),
+
+    border: false,
+
+    tbar: [
+       {
+           text: gettext("Console"),
+           handler: function() {
+               PMG.Utils.openVNCViewer('shell', Proxmox.NodeName);
+           }
+       }
+    ]
+
+});
+    
index f1ec382df6056178aa1e37508151b8ac6ca18684..45d39ff3fcd1c2160414592bfabf460bd783343b 100644 (file)
@@ -189,6 +189,17 @@ Ext.define('PMG.Utils', {
        }
     },
 
+    openVNCViewer: function(consoletype, nodename) {
+       var url = Ext.urlEncode({
+           console: consoletype, // upgrade or shell
+           novnc: 1,
+           node: nodename
+       });
+       var nw = window.open("?" + url, '_blank',
+                            "innerWidth=745,innerheight=427");
+       nw.focus();
+    },
+
     constructor: function() {
        var me = this;