From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B650662E3E for ; Tue, 24 Nov 2020 14:53:04 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 313B6D648 for ; Tue, 24 Nov 2020 14:52:33 +0100 (CET) Received: from kvmformation1.odiso.net (globalOdiso.M6Lille.odiso.net [89.248.211.242]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5F136D469 for ; Tue, 24 Nov 2020 14:52:24 +0100 (CET) Received: by kvmformation1.odiso.net (Postfix, from userid 0) id 0A6551132B15; Tue, 24 Nov 2020 14:52:24 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Tue, 24 Nov 2020 14:52:19 +0100 Message-Id: <20201124135221.2856467-14-aderumier@odiso.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201124135221.2856467-1-aderumier@odiso.com> References: <20201124135221.2856467-1-aderumier@odiso.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -0.240 Adjusted score from AWL reputation of From: address HEADER_FROM_DIFFERENT_DOMAINS 0.249 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KHOP_HELO_FCRDNS 0.399 Relay HELO differs from its IP's reverse DNS NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH v7 pve-manager 13/15] move ipams && dns options to zone X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 13:53:04 -0000 Signed-off-by: Alexandre Derumier --- www/manager6/Utils.js | 4 +-- www/manager6/sdn/SubnetEdit.js | 39 +------------------------- www/manager6/sdn/SubnetView.js | 23 ++------------- www/manager6/sdn/VnetEdit.js | 10 ++----- www/manager6/sdn/ZoneView.js | 42 ++++++++++++++++++++++++++-- www/manager6/sdn/zones/Base.js | 31 ++++++++++++++++++++ www/manager6/sdn/zones/SimpleEdit.js | 1 - 7 files changed, 78 insertions(+), 72 deletions(-) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 257af3fd..98cb8ca1 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -178,7 +178,7 @@ Ext.define('PVE.Utils', { utilities: { render_sdn_pending: function(rec,value,key, index) { if (rec.data.state === 'deleted') { if (value === undefined) { - return ''; + return ' '; } else { return '
'+ value +'
'; } @@ -188,7 +188,7 @@ Ext.define('PVE.Utils', { utilities: { value = rec.data.pending[key]; } if (value === undefined || value === null) { - value = ''; + value = ' '; } return '
' + value + '
'; } else if (rec.data.state === 'changed') { diff --git a/www/manager6/sdn/SubnetEdit.js b/www/manager6/sdn/SubnetEdit.js index 653c8ae5..83c6961c 100644 --- a/www/manager6/sdn/SubnetEdit.js +++ b/www/manager6/sdn/SubnetEdit.js @@ -46,50 +46,13 @@ Ext.define('PVE.sdn.SubnetInputPanel', { checked: false, fieldLabel: 'SNAT' }, - ], - advancedItems: [ - { - xtype: 'pveSDNIpamSelector', - fieldLabel: gettext('Ipam'), - name: 'ipam', - value: 'pve', - allowBlank: false, - }, - { - xtype: 'pveSDNDnsSelector', - fieldLabel: gettext('Dns server'), - name: 'dns', - value: '', - allowBlank: true, - }, - { - xtype: 'proxmoxtextfield', - name: 'dnszone', - skipEmptyText: true, - fieldLabel: gettext('DNS zone'), - allowBlank: true - }, { xtype: 'proxmoxtextfield', name: 'dnszoneprefix', skipEmptyText: true, fieldLabel: gettext('DNS zone prefix'), allowBlank: true - }, - { - xtype: 'pveSDNDnsSelector', - fieldLabel: gettext('Reverse Dns server'), - name: 'reversedns', - value: '', - allowBlank: true, - }, - { - xtype: 'proxmoxtextfield', - name: 'reversednszone', - skipEmptyText: true, - fieldLabel: gettext('Reverse DNS zone'), - allowBlank: true - }, + } ] }); diff --git a/www/manager6/sdn/SubnetView.js b/www/manager6/sdn/SubnetView.js index 0c04ddf1..bff047fb 100644 --- a/www/manager6/sdn/SubnetView.js +++ b/www/manager6/sdn/SubnetView.js @@ -124,30 +124,13 @@ Ext.define('PVE.sdn.SubnetView', { } }, { - header: 'Ipam', + header: gettext('Dns prefix'), flex: 1, - dataIndex: 'ipam', + dataIndex: 'dnszoneprefix', renderer: function(value, metaData, rec) { - return PVE.Utils.render_sdn_pending(rec, value, 'ipam'); + return PVE.Utils.render_sdn_pending(rec, value, 'dnszoneprefix'); } }, - { - header: gettext('Pending'), - flex: 3, - dataIndex: 'pending', - renderer: function(value, metaData, rec) { - if(value !== undefined ) { - delete value.cidr; - delete value.gateway; - delete value.snat; - delete value.ipam; - if(!Ext.Object.isEmpty(value)){ - return JSON.stringify(value); - } - } - return ''; - } - }, ], listeners: { diff --git a/www/manager6/sdn/VnetEdit.js b/www/manager6/sdn/VnetEdit.js index 03e539ab..af5d6cde 100644 --- a/www/manager6/sdn/VnetEdit.js +++ b/www/manager6/sdn/VnetEdit.js @@ -9,14 +9,8 @@ Ext.define('PVE.sdn.VnetInputPanel', { values.type = 'vnet'; } - if (!values.ipv6) { - delete values.ipv6; - } - if (!values.ipv4) { - delete values.ipv4; - } - if (!values.mac) { - delete values.mac; + if (!values.vlanaware) { + delete values.vlanaware; } return values; diff --git a/www/manager6/sdn/ZoneView.js b/www/manager6/sdn/ZoneView.js index b530bd5f..d842654a 100644 --- a/www/manager6/sdn/ZoneView.js +++ b/www/manager6/sdn/ZoneView.js @@ -117,7 +117,7 @@ Ext.define('PVE.sdn.ZoneView', { columns: [ { header: 'ID', - flex: 2, + width: 100, dataIndex: 'zone', renderer: function(value, metaData, rec) { return PVE.Utils.render_sdn_pending(rec, value, 'zone', 1); @@ -125,7 +125,7 @@ Ext.define('PVE.sdn.ZoneView', { }, { header: gettext('Type'), - flex: 1, + width: 100, dataIndex: 'type', renderer: function(value, metaData, rec) { return PVE.Utils.render_sdn_pending(rec, value, 'type', 1); @@ -133,7 +133,7 @@ Ext.define('PVE.sdn.ZoneView', { }, { header: 'MTU', - flex: 1, + width: 50, dataIndex: 'mtu', renderer: function(value, metaData, rec) { return PVE.Utils.render_sdn_pending(rec, value, 'mtu'); @@ -147,6 +147,38 @@ Ext.define('PVE.sdn.ZoneView', { return PVE.Utils.render_sdn_pending(rec, value, 'nodes'); } }, + { + header: 'Ipam', + flex: 3, + dataIndex: 'ipam', + renderer: function(value, metaData, rec) { + return PVE.Utils.render_sdn_pending(rec, value, 'ipam'); + } + }, + { + header: gettext('Domain'), + flex: 3, + dataIndex: 'dnszone', + renderer: function(value, metaData, rec) { + return PVE.Utils.render_sdn_pending(rec, value, 'dnszone'); + } + }, + { + header: gettext('Dns'), + flex: 3, + dataIndex: 'dns', + renderer: function(value, metaData, rec) { + return PVE.Utils.render_sdn_pending(rec, value, 'dns'); + } + }, + { + header: gettext('Reverse dns'), + flex: 3, + dataIndex: 'reversedns', + renderer: function(value, metaData, rec) { + return PVE.Utils.render_sdn_pending(rec, value, 'reversedns'); + } + }, { header: gettext('Pending'), flex: 3, @@ -157,6 +189,10 @@ Ext.define('PVE.sdn.ZoneView', { delete value.zone; delete value.type; delete value.mtu; + delete value.ipam; + delete value.dns; + delete value.reversedns; + delete value.dnszone; if(!Ext.Object.isEmpty(value)){ return JSON.stringify(value); } diff --git a/www/manager6/sdn/zones/Base.js b/www/manager6/sdn/zones/Base.js index 724ae317..6e2f5c1c 100644 --- a/www/manager6/sdn/zones/Base.js +++ b/www/manager6/sdn/zones/Base.js @@ -18,6 +18,37 @@ Ext.define('PVE.panel.SDNZoneBase', { initComponent : function() { var me = this; + me.advancedItems = [ + { + xtype: 'pveSDNIpamSelector', + fieldLabel: gettext('Ipam'), + name: 'ipam', + value: 'pve', + allowBlank: false, + }, + { + xtype: 'pveSDNDnsSelector', + fieldLabel: gettext('Dns server'), + name: 'dns', + value: '', + allowBlank: true, + }, + { + xtype: 'pveSDNDnsSelector', + fieldLabel: gettext('Reverse Dns server'), + name: 'reversedns', + value: '', + allowBlank: true, + }, + { + xtype: 'proxmoxtextfield', + name: 'dnszone', + skipEmptyText: true, + fieldLabel: gettext('DNS zone'), + allowBlank: true + }, + ]; + me.callParent(); } }); diff --git a/www/manager6/sdn/zones/SimpleEdit.js b/www/manager6/sdn/zones/SimpleEdit.js index 7e2d8dd7..c9faa5a0 100644 --- a/www/manager6/sdn/zones/SimpleEdit.js +++ b/www/manager6/sdn/zones/SimpleEdit.js @@ -45,7 +45,6 @@ Ext.define('PVE.sdn.zones.SimpleInputPanel', { multiSelect: true, autoSelect: false }, - ]; me.callParent(); -- 2.20.1