[pve-devel] [PATCH manager] fix: #1145 enable CT/VM firewall by default on creation via WebUI
Christian Ebner
c.ebner at proxmox.com
Wed Apr 3 09:26:32 CEST 2019
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
www/manager6/lxc/Network.js | 1 +
www/manager6/qemu/HardwareView.js | 3 ++-
www/manager6/qemu/NetworkEdit.js | 6 ++++--
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index 88c6e561..1e11539d 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -56,6 +56,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
cdata.name = 'eth0';
me.dataCache = {};
}
+ cdata.firewall = (me.insideWizard || me.isCreate);
if (!me.dataCache) {
throw "no dataCache specified";
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index bfa06927..ba588e37 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -638,7 +638,8 @@ Ext.define('PVE.qemu.HardwareView', {
handler: function() {
var win = Ext.create('PVE.qemu.NetworkEdit', {
url: '/api2/extjs/' + baseurl,
- pveSelNode: me.pveSelNode
+ pveSelNode: me.pveSelNode,
+ isCreate: true
});
win.on('destroy', reload);
win.show();
diff --git a/www/manager6/qemu/NetworkEdit.js b/www/manager6/qemu/NetworkEdit.js
index dd950d2b..abce4903 100644
--- a/www/manager6/qemu/NetworkEdit.js
+++ b/www/manager6/qemu/NetworkEdit.js
@@ -82,7 +82,8 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
{
xtype: 'proxmoxcheckbox',
fieldLabel: gettext('Firewall'),
- name: 'firewall'
+ name: 'firewall',
+ checked: (me.insideWizard || me.isCreate)
}
];
@@ -185,7 +186,8 @@ Ext.define('PVE.qemu.NetworkEdit', {
var ipanel = Ext.create('PVE.qemu.NetworkInputPanel', {
confid: me.confid,
- nodename: nodename
+ nodename: nodename,
+ isCreate: me.isCreate
});
Ext.applyIf(me, {
--
2.11.0
More information about the pve-devel
mailing list