[pve-devel] [PATCH manager 17/19] use DNSView/DNSEdit from widget toolkit
Dominik Csapak
d.csapak at proxmox.com
Thu Dec 21 13:36:20 CET 2017
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Makefile | 2 --
www/manager6/node/Config.js | 4 +++-
www/manager6/node/DNSEdit.js | 55 --------------------------------------------
www/manager6/node/DNSView.js | 48 --------------------------------------
4 files changed, 3 insertions(+), 106 deletions(-)
delete mode 100644 www/manager6/node/DNSEdit.js
delete mode 100644 www/manager6/node/DNSView.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index c8c98aa7..76efe811 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -113,8 +113,6 @@ JSSRC= \
ceph/StatusDetail.js \
ceph/Config.js \
node/Disks.js \
- node/DNSEdit.js \
- node/DNSView.js \
node/StatusView.js \
node/Summary.js \
node/Subscription.js \
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index cf548976..d85800a1 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -180,7 +180,9 @@ Ext.define('PVE.node.Config', {
iconCls: 'fa fa-globe',
groups: ['services'],
itemId: 'dns',
- xtype: 'pveNodeDNSView'
+ nodename: nodename,
+ onlineHelp: 'sysadmin_network_configuration',
+ xtype: 'proxmoxNodeDNSView'
},
{
title: gettext('Time'),
diff --git a/www/manager6/node/DNSEdit.js b/www/manager6/node/DNSEdit.js
deleted file mode 100644
index e878622d..00000000
--- a/www/manager6/node/DNSEdit.js
+++ /dev/null
@@ -1,55 +0,0 @@
-Ext.define('PVE.node.DNSEdit', {
- extend: 'PVE.window.Edit',
- alias: ['widget.pveNodeDNSEdit'],
-
- initComponent : function() {
- var me = this;
-
- var nodename = me.pveSelNode.data.node;
- if (!nodename) {
- throw "no node name specified";
- }
-
- me.items = [
- {
- xtype: 'textfield',
- fieldLabel: gettext('Search domain'),
- name: 'search',
- allowBlank: false
- },
- {
- xtype: 'proxmoxtextfield',
- fieldLabel: gettext('DNS server') + " 1",
- vtype: 'IP64Address',
- skipEmptyText: true,
- name: 'dns1'
- },
- {
- xtype: 'proxmoxtextfield',
- fieldLabel: gettext('DNS server') + " 2",
- vtype: 'IP64Address',
- skipEmptyText: true,
- name: 'dns2'
- },
- {
- xtype: 'proxmoxtextfield',
- fieldLabel: gettext('DNS server') + " 3",
- vtype: 'IP64Address',
- skipEmptyText: true,
- name: 'dns3'
- }
- ];
-
- Ext.applyIf(me, {
- subject: gettext('DNS'),
- url: "/api2/extjs/nodes/" + nodename + "/dns",
- fieldDefaults: {
- labelWidth: 120
- }
- });
-
- me.callParent();
-
- me.load();
- }
-});
diff --git a/www/manager6/node/DNSView.js b/www/manager6/node/DNSView.js
deleted file mode 100644
index 9e9683ad..00000000
--- a/www/manager6/node/DNSView.js
+++ /dev/null
@@ -1,48 +0,0 @@
-Ext.define('PVE.node.DNSView', {
- extend: 'PVE.grid.ObjectGrid',
- alias: ['widget.pveNodeDNSView'],
-
- onlineHelp: 'sysadmin_network_configuration',
-
- initComponent : function() {
- var me = this;
-
- var nodename = me.pveSelNode.data.node;
- if (!nodename) {
- throw "no node name specified";
- }
-
- var run_editor = function() {
- var win = Ext.create('PVE.node.DNSEdit', {
- pveSelNode: me.pveSelNode
- });
- win.show();
- };
-
- Ext.apply(me, {
- url: "/api2/json/nodes/" + nodename + "/dns",
- cwidth1: 130,
- interval: 1000,
- rows: {
- search: { header: 'Search domain', required: true },
- dns1: { header: gettext('DNS server') + " 1", required: true },
- dns2: { header: gettext('DNS server') + " 2" },
- dns3: { header: gettext('DNS server') + " 3" }
- },
- tbar: [
- {
- text: gettext("Edit"),
- handler: run_editor
- }
- ],
- listeners: {
- itemdblclick: run_editor
- }
- });
-
- me.callParent();
-
- me.on('activate', me.rstore.startUpdate);
- me.on('destroy', me.rstore.stopUpdate);
- }
-});
--
2.11.0
More information about the pve-devel
mailing list