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 87D5D76A4F for ; Fri, 16 Jul 2021 16:21:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 83EF911BF3 for ; Fri, 16 Jul 2021 16:21:30 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 8983211B8A for ; Fri, 16 Jul 2021 16:21:27 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 60F104214A for ; Fri, 16 Jul 2021 16:21:27 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 16 Jul 2021 16:21:24 +0200 Message-Id: <20210716142126.1216972-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210716142126.1216972-1-d.csapak@proxmox.com> References: <20210716142126.1216972-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.569 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager v3 3/5] ui: move sdn schemas to Schema 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: Fri, 16 Jul 2021 14:21:30 -0000 but dropped the 'Schema' postfix Signed-off-by: Dominik Csapak --- www/manager6/Schema.js | 91 ++++++++++++++++++++++++++ www/manager6/Utils.js | 101 ++--------------------------- www/manager6/sdn/ControllerView.js | 4 +- www/manager6/sdn/DnsView.js | 4 +- www/manager6/sdn/IpamView.js | 4 +- www/manager6/sdn/ZoneView.js | 4 +- 6 files changed, 104 insertions(+), 104 deletions(-) diff --git a/www/manager6/Schema.js b/www/manager6/Schema.js index 73d98889..374b5f17 100644 --- a/www/manager6/Schema.js +++ b/www/manager6/Schema.js @@ -100,4 +100,95 @@ Ext.define('PVE.Schema', { // a singleton backups: false, }, }, + + sdnvnet: { + vnet: { + name: 'vnet', + faIcon: 'folder', + }, + }, + + sdnzone: { + zone: { + name: 'zone', + hideAdd: true, + }, + simple: { + name: 'Simple', + ipanel: 'SimpleInputPanel', + faIcon: 'th', + }, + vlan: { + name: 'VLAN', + ipanel: 'VlanInputPanel', + faIcon: 'th', + }, + qinq: { + name: 'QinQ', + ipanel: 'QinQInputPanel', + faIcon: 'th', + }, + vxlan: { + name: 'VXLAN', + ipanel: 'VxlanInputPanel', + faIcon: 'th', + }, + evpn: { + name: 'EVPN', + ipanel: 'EvpnInputPanel', + faIcon: 'th', + }, + }, + + sdncontroller: { + controller: { + name: 'controller', + hideAdd: true, + }, + evpn: { + name: 'evpn', + ipanel: 'EvpnInputPanel', + faIcon: 'crosshairs', + }, + bgp: { + name: 'bgp', + ipanel: 'BgpInputPanel', + faIcon: 'crosshairs', + }, + }, + + sdnipam: { + ipam: { + name: 'ipam', + hideAdd: true, + }, + pve: { + name: 'PVE', + ipanel: 'PVEIpamInputPanel', + faIcon: 'th', + hideAdd: true, + }, + netbox: { + name: 'Netbox', + ipanel: 'NetboxInputPanel', + faIcon: 'th', + }, + phpipam: { + name: 'PhpIpam', + ipanel: 'PhpIpamInputPanel', + faIcon: 'th', + }, + }, + + sdndns: { + dns: { + name: 'dns', + hideAdd: true, + }, + powerdns: { + name: 'powerdns', + ipanel: 'PowerdnsInputPanel', + faIcon: 'th', + }, + }, }); diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index e8c9f218..8d210b69 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -760,99 +760,8 @@ Ext.define('PVE.Utils', { }, }, - sdnvnetSchema: { - vnet: { - name: 'vnet', - faIcon: 'folder', - }, - }, - - sdnzoneSchema: { - zone: { - name: 'zone', - hideAdd: true, - }, - simple: { - name: 'Simple', - ipanel: 'SimpleInputPanel', - faIcon: 'th', - }, - vlan: { - name: 'VLAN', - ipanel: 'VlanInputPanel', - faIcon: 'th', - }, - qinq: { - name: 'QinQ', - ipanel: 'QinQInputPanel', - faIcon: 'th', - }, - vxlan: { - name: 'VXLAN', - ipanel: 'VxlanInputPanel', - faIcon: 'th', - }, - evpn: { - name: 'EVPN', - ipanel: 'EvpnInputPanel', - faIcon: 'th', - }, - }, - - sdncontrollerSchema: { - controller: { - name: 'controller', - hideAdd: true, - }, - evpn: { - name: 'evpn', - ipanel: 'EvpnInputPanel', - faIcon: 'crosshairs', - }, - bgp: { - name: 'bgp', - ipanel: 'BgpInputPanel', - faIcon: 'crosshairs', - }, - }, - - sdnipamSchema: { - ipam: { - name: 'ipam', - hideAdd: true, - }, - pve: { - name: 'PVE', - ipanel: 'PVEIpamInputPanel', - faIcon: 'th', - hideAdd: true, - }, - netbox: { - name: 'Netbox', - ipanel: 'NetboxInputPanel', - faIcon: 'th', - }, - phpipam: { - name: 'PhpIpam', - ipanel: 'PhpIpamInputPanel', - faIcon: 'th', - }, - }, - - sdndnsSchema: { - dns: { - name: 'dns', - hideAdd: true, - }, - powerdns: { - name: 'powerdns', - ipanel: 'PowerdnsInputPanel', - faIcon: 'th', - }, - }, - format_sdnvnet_type: function(value, md, record) { - var schema = PVE.Utils.sdnvnetSchema[value]; + var schema = PVE.Schema.sdnvnet[value]; if (schema) { return schema.name; } @@ -860,7 +769,7 @@ Ext.define('PVE.Utils', { }, format_sdnzone_type: function(value, md, record) { - var schema = PVE.Utils.sdnzoneSchema[value]; + var schema = PVE.Schema.sdnzone[value]; if (schema) { return schema.name; } @@ -868,7 +777,7 @@ Ext.define('PVE.Utils', { }, format_sdncontroller_type: function(value, md, record) { - var schema = PVE.Utils.sdncontrollerSchema[value]; + var schema = PVE.Schema.sdncontroller[value]; if (schema) { return schema.name; } @@ -876,7 +785,7 @@ Ext.define('PVE.Utils', { }, format_sdnipam_type: function(value, md, record) { - var schema = PVE.Utils.sdnipamSchema[value]; + var schema = PVE.Schema.sdnipam[value]; if (schema) { return schema.name; } @@ -884,7 +793,7 @@ Ext.define('PVE.Utils', { }, format_sdndns_type: function(value, md, record) { - var schema = PVE.Utils.sdndnsSchema[value]; + var schema = PVE.Schema.sdndns[value]; if (schema) { return schema.name; } diff --git a/www/manager6/sdn/ControllerView.js b/www/manager6/sdn/ControllerView.js index 8d92a715..e548de23 100644 --- a/www/manager6/sdn/ControllerView.js +++ b/www/manager6/sdn/ControllerView.js @@ -8,7 +8,7 @@ Ext.define('PVE.sdn.ControllerView', { stateId: 'grid-sdn-controller', createSDNControllerEditWindow: function(type, sid) { - var schema = PVE.Utils.sdncontrollerSchema[type]; + var schema = PVE.Schema.sdncontroller[type]; if (!schema || !schema.ipanel) { throw "no editor registered for controller type: " + type; } @@ -68,7 +68,7 @@ Ext.define('PVE.sdn.ControllerView', { return function() { me.createSDNControllerEditWindow(type); }; }; let addMenuItems = []; - for (const [type, controller] of Object.entries(PVE.Utils.sdncontrollerSchema)) { + for (const [type, controller] of Object.entries(PVE.Schema.sdncontroller)) { if (controller.hideAdd) { continue; } diff --git a/www/manager6/sdn/DnsView.js b/www/manager6/sdn/DnsView.js index d1654cab..ed42cbfe 100644 --- a/www/manager6/sdn/DnsView.js +++ b/www/manager6/sdn/DnsView.js @@ -6,7 +6,7 @@ Ext.define('PVE.sdn.DnsView', { stateId: 'grid-sdn-dns', createSDNEditWindow: function(type, sid) { - let schema = PVE.Utils.sdndnsSchema[type]; + let schema = PVE.Schema.sdndns[type]; if (!schema || !schema.ipanel) { throw "no editor registered for dns type: " + type; } @@ -68,7 +68,7 @@ Ext.define('PVE.sdn.DnsView', { return function() { me.createSDNEditWindow(type); }; }; let addMenuItems = []; - for (const [type, dns] of Object.entries(PVE.Utils.sdndnsSchema)) { + for (const [type, dns] of Object.entries(PVE.Schema.sdndns)) { if (dns.hideAdd) { continue; } diff --git a/www/manager6/sdn/IpamView.js b/www/manager6/sdn/IpamView.js index 0d00d8e6..cc526a9f 100644 --- a/www/manager6/sdn/IpamView.js +++ b/www/manager6/sdn/IpamView.js @@ -6,7 +6,7 @@ Ext.define('PVE.sdn.IpamView', { stateId: 'grid-sdn-ipam', createSDNEditWindow: function(type, sid) { - let schema = PVE.Utils.sdnipamSchema[type]; + let schema = PVE.Schema.sdnipam[type]; if (!schema || !schema.ipanel) { throw "no editor registered for ipam type: " + type; } @@ -66,7 +66,7 @@ Ext.define('PVE.sdn.IpamView', { return function() { me.createSDNEditWindow(type); }; }; let addMenuItems = []; - for (const [type, ipam] of Object.entries(PVE.Utils.sdnipamSchema)) { + for (const [type, ipam] of Object.entries(PVE.Schema.sdnipam)) { if (ipam.hideAdd) { continue; } diff --git a/www/manager6/sdn/ZoneView.js b/www/manager6/sdn/ZoneView.js index ac812d4a..b700909a 100644 --- a/www/manager6/sdn/ZoneView.js +++ b/www/manager6/sdn/ZoneView.js @@ -8,7 +8,7 @@ Ext.define('PVE.sdn.ZoneView', { stateId: 'grid-sdn-zone', createSDNEditWindow: function(type, sid) { - let schema = PVE.Utils.sdnzoneSchema[type]; + let schema = PVE.Schema.sdnzone[type]; if (!schema || !schema.ipanel) { throw "no editor registered for zone type: " + type; } @@ -83,7 +83,7 @@ Ext.define('PVE.sdn.ZoneView', { return function() { me.createSDNEditWindow(type); }; }; let addMenuItems = []; - for (const [type, zone] of Object.entries(PVE.Utils.sdnzoneSchema)) { + for (const [type, zone] of Object.entries(PVE.Schema.sdnzone)) { if (zone.hideAdd) { continue; } -- 2.30.2