dns: optionally send delete for optional values
pbs only deletes the optional values here when they are sent with the 'delete' parameter, in contrast to pve/pmg that don't have a delete parameter currently and always use the parameters as source of truth. So to handle that, optionally set deleteEmpty if set from outside Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
9c69fc1b8f
commit
e3cf77e177
@ -2,6 +2,9 @@ Ext.define('Proxmox.node.DNSEdit', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
alias: ['widget.proxmoxNodeDNSEdit'],
|
||||
|
||||
// pbs needs this set to true
|
||||
deleteEmpty: false,
|
||||
|
||||
initComponent: function() {
|
||||
let me = this;
|
||||
|
||||
@ -21,6 +24,7 @@ Ext.define('Proxmox.node.DNSEdit', {
|
||||
fieldLabel: gettext('DNS server') + " 1",
|
||||
vtype: 'IP64Address',
|
||||
skipEmptyText: true,
|
||||
deleteEmpty: me.deleteEmpty,
|
||||
name: 'dns1',
|
||||
},
|
||||
{
|
||||
@ -28,6 +32,7 @@ Ext.define('Proxmox.node.DNSEdit', {
|
||||
fieldLabel: gettext('DNS server') + " 2",
|
||||
vtype: 'IP64Address',
|
||||
skipEmptyText: true,
|
||||
deleteEmpty: me.deleteEmpty,
|
||||
name: 'dns2',
|
||||
},
|
||||
{
|
||||
@ -35,6 +40,7 @@ Ext.define('Proxmox.node.DNSEdit', {
|
||||
fieldLabel: gettext('DNS server') + " 3",
|
||||
vtype: 'IP64Address',
|
||||
skipEmptyText: true,
|
||||
deleteEmpty: me.deleteEmpty,
|
||||
name: 'dns3',
|
||||
},
|
||||
];
|
||||
|
@ -2,6 +2,9 @@ Ext.define('Proxmox.node.DNSView', {
|
||||
extend: 'Proxmox.grid.ObjectGrid',
|
||||
alias: ['widget.proxmoxNodeDNSView'],
|
||||
|
||||
// pbs needs this set to true
|
||||
deleteEmpty: false,
|
||||
|
||||
initComponent: function() {
|
||||
let me = this;
|
||||
|
||||
@ -12,6 +15,7 @@ Ext.define('Proxmox.node.DNSView', {
|
||||
let run_editor = () => Ext.create('Proxmox.node.DNSEdit', {
|
||||
autoShow: true,
|
||||
nodename: me.nodename,
|
||||
deleteEmpty: me.deleteEmpty,
|
||||
});
|
||||
|
||||
Ext.apply(me, {
|
||||
|
Loading…
Reference in New Issue
Block a user