mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 13:36:37 +00:00
firewall rules: add fix for editable ComboGrid
This commit is contained in:
parent
1f3e956a53
commit
060b19b635
@ -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', {
|
|||||||
{
|
{
|
||||||
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',
|
||||||
|
Loading…
Reference in New Issue
Block a user