]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
Enable firewall GUI
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 6 May 2014 10:52:11 +0000 (12:52 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 6 May 2014 10:52:11 +0000 (12:52 +0200)
www/manager/dc/Config.js
www/manager/node/Config.js
www/manager/openvz/Config.js
www/manager/qemu/Config.js

index 04b4110632e39dacb913d986a2df177fe439d984..cb833bdb64146beb1ae9d051347108b781fdbcce 100644 (file)
@@ -82,6 +82,14 @@ Ext.define('PVE.dc.Config', {
                    xtype: 'pveDcHAConfig',
                    title: 'HA',
                    itemId: 'ha'
+               },
+               {
+                   xtype: 'pveFirewallPanel',
+                   title: gettext('Firewall'),
+                   base_url: '/cluster/firewall',
+                   fwtype: 'dc',
+                   phstateid: me.hstateid,
+                   itemId: 'firewall'
                }
            ]);
 
index cc7f3188f963839829acea804b22c43884be46c5..c351ffd930e30f3bb3b655a71874abaaabee1068 100644 (file)
@@ -141,12 +141,22 @@ Ext.define('PVE.node.Config', {
        ]);
 
        if (caps.nodes['Sys.Console']) {
-           me.items.push([{
-               title: gettext('Updates'),
-               itemId: 'apt',
-               xtype: 'pveNodeAPT',
-               nodename: nodename
-           }]);
+           me.items.push([
+               {
+                   xtype: 'pveFirewallPanel',
+                   title: gettext('Firewall'),
+                   base_url: '/nodes/' + nodename + '/firewall',
+                   fwtype: 'node',
+                   phstateid: me.hstateid,
+                   itemId: 'firewall'
+               },
+               {
+                   title: gettext('Updates'),
+                   itemId: 'apt',
+                   xtype: 'pveNodeAPT',
+                   nodename: nodename
+               }
+           ]);
            me.items.push([{
                title: 'Ceph',
                itemId: 'ceph',
index 576dd77cccd305ee691a46847c7044490d256329..8589f22006da393828ba635f1a5e6a8ce77d4ee5 100644 (file)
@@ -17,15 +17,17 @@ Ext.define('PVE.openvz.Config', {
 
        var caps = Ext.state.Manager.get('GuiCap');
 
+       var base_url = '/nodes/' + nodename + '/openvz/' + vmid;
        me.statusStore = Ext.create('PVE.data.ObjectStore', {
-           url: "/api2/json/nodes/" + nodename + "/openvz/" + vmid + "/status/current",
+           url: '/api2/json' + base_url + '/status/current',
            interval: 1000
        });
 
        var vm_command = function(cmd, params) {
            PVE.Utils.API2Request({
                params: params,
-               url: '/nodes/' + nodename + '/openvz/' + vmid + "/status/" + cmd,
+               url: base_url + "/status/" + cmd,
                waitMsgTarget: me,
                method: 'POST',
                failure: function(response, opts) {
@@ -89,7 +91,7 @@ Ext.define('PVE.openvz.Config', {
            confirmMsg: Ext.String.format(gettext('Are you sure you want to remove VM {0}? This will permanently erase all VM data.'), vmid),
            handler: function() {
                PVE.Utils.API2Request({
-                   url: '/nodes/' + nodename + '/openvz/' + vmid,
+                   url: base_url,
                    method: 'DELETE',
                    waitMsgTarget: me,
                    failure: function(response, opts) {
@@ -153,7 +155,7 @@ Ext.define('PVE.openvz.Config', {
                    title: 'UBC',
                    itemId: 'ubc',
                    xtype: 'pveBeanCounterGrid',
-                   url: '/api2/json/nodes/' + nodename + '/openvz/' + vmid + '/status/ubc'
+                   url: '/api2/json' + base_url + '/status/ubc'
                }
            ]
        });
@@ -166,6 +168,19 @@ Ext.define('PVE.openvz.Config', {
            });
        }
 
+       if (caps.vms['VM.Console']) {
+           me.items.push([
+               {
+                   xtype: 'pveFirewallPanel',
+                   title: gettext('Firewall'),
+                   base_url: base_url + '/firewall',
+                   fwtype: 'vm',
+                   phstateid: me.hstateid,
+                   itemId: 'firewall'
+               }
+           ]);
+       }
+
        if (caps.vms['Permissions.Modify']) {
            me.items.push({
                xtype: 'pveACLView',
index 91db06acfb4eef30081ce3175f5166153280c5eb..1d1c8a2054fe18d1cc255c047519835689cbb13e 100644 (file)
@@ -17,15 +17,17 @@ Ext.define('PVE.qemu.Config', {
 
        var caps = Ext.state.Manager.get('GuiCap');
 
+       var base_url = '/nodes/' + nodename + "/qemu/" + vmid;
        me.statusStore = Ext.create('PVE.data.ObjectStore', {
-           url: "/api2/json/nodes/" + nodename + "/qemu/" + vmid + "/status/current",
+           url: '/api2/json' + base_url + '/status/current',
            interval: 1000
        });
 
        var vm_command = function(cmd, params) {
            PVE.Utils.API2Request({
                params: params,
-               url: '/nodes/' + nodename + '/qemu/' + vmid + "/status/" + cmd,
+               url: base_url + '/status/' + cmd,
                waitMsgTarget: me,
                method: 'POST',
                failure: function(response, opts) {
@@ -98,7 +100,7 @@ Ext.define('PVE.qemu.Config', {
            confirmMsg: Ext.String.format(gettext('Are you sure you want to remove VM {0}? This will permanently erase all VM data.'), vmid),
            handler: function() {
                PVE.Utils.API2Request({
-                   url: '/nodes/' + nodename + '/qemu/' + vmid,
+                   url: base_url,
                    method: 'DELETE',
                    waitMsgTarget: me,
                    failure: function(response, opts) {
@@ -175,6 +177,19 @@ Ext.define('PVE.qemu.Config', {
            });
        }
 
+       if (caps.vms['VM.Console']) {
+           me.items.push([
+               {
+                   xtype: 'pveFirewallPanel',
+                   title: gettext('Firewall'),
+                   base_url: base_url + '/firewall',
+                   fwtype: 'vm',
+                   phstateid: me.hstateid,
+                   itemId: 'firewall'
+               }
+           ]);
+       }
+
        if (caps.vms['Permissions.Modify']) {
            me.items.push({
                xtype: 'pveACLView',