Commit c80570b6 authored by Dietmar Maurer's avatar Dietmar Maurer

firewall rules: add fix for editable ComboGrid

parent 008dfe67
...@@ -51,6 +51,24 @@ Ext.define('PVE.FirewallRulePanel', { ...@@ -51,6 +51,24 @@ Ext.define('PVE.FirewallRulePanel', {
allow_iface: false, allow_iface: false,
onGetValues: function(values) {
var me = this;
// hack: editable ComboGrid returns nothing when empty, so we need to set ''
if (values.source === undefined) {
values.source = '';
}
if (values.dest === undefined) {
values.dest = '';
}
if (values.proto === undefined) {
values.proto = '';
}
return values;
},
initComponent : function() { initComponent : function() {
var me = this; var me = this;
...@@ -149,10 +167,12 @@ Ext.define('PVE.FirewallRulePanel', { ...@@ -149,10 +167,12 @@ Ext.define('PVE.FirewallRulePanel', {
{ {
xtype: 'pveIPProtocolSelector', xtype: 'pveIPProtocolSelector',
name: 'proto', name: 'proto',
autoSelect: false,
queryDelay: 900000000, // disable query
editable: true,
value: '', value: '',
emptyText: 'any', emptyText: 'any',
fieldLabel: gettext('Protocol'), fieldLabel: gettext('Protocol')
allowBlank: true
}, },
{ {
xtype: 'displayfield', xtype: 'displayfield',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment