[pve-devel] r5990 - in pve-manager/pve2/www/new: . node

svn-commits at proxmox.com svn-commits at proxmox.com
Wed May 18 06:48:26 CEST 2011


Author: dietmar
Date: 2011-05-18 06:48:26 +0200 (Wed, 18 May 2011)
New Revision: 5990

Added:
   pve-manager/pve2/www/new/node/DNSView.js
Modified:
   pve-manager/pve2/www/new/Makefile.am
   pve-manager/pve2/www/new/node/Config.js
   pve-manager/pve2/www/new/node/TimeView.js
Log:
impl. DNSView


Modified: pve-manager/pve2/www/new/Makefile.am
===================================================================
--- pve-manager/pve2/www/new/Makefile.am	2011-05-17 13:25:32 UTC (rev 5989)
+++ pve-manager/pve2/www/new/Makefile.am	2011-05-18 04:48:26 UTC (rev 5990)
@@ -30,6 +30,7 @@
 	grid/ResourceGrid.js				\
 	tree/ResourceTree.js				\
 	panel/ConfigPanel.js				\
+	node/DNSView.js					\
 	node/TimeView.js				\
 	node/TimeEdit.js				\
 	node/StatusView.js				\

Modified: pve-manager/pve2/www/new/node/Config.js
===================================================================
--- pve-manager/pve2/www/new/node/Config.js	2011-05-17 13:25:32 UTC (rev 5989)
+++ pve-manager/pve2/www/new/node/Config.js	2011-05-18 04:48:26 UTC (rev 5990)
@@ -31,14 +31,12 @@
 		{
 		    title: 'DNS',
 		    itemId: 'dns',
-		    //xtype: 'pveNodeDNSView',
-		    //nodename: nodename
-		    html: "DNS"
+		    xtype: 'pveNodeDNSView',
 		},
 		{
 		    title: 'Time',
 		    itemId: 'time',
-		    xtype: 'PVE.node.TimeView'
+		    xtype: 'pveNodeTimeView'
 		},
 		{
 		    title: 'Tasks',

Added: pve-manager/pve2/www/new/node/DNSView.js
===================================================================
--- pve-manager/pve2/www/new/node/DNSView.js	                        (rev 0)
+++ pve-manager/pve2/www/new/node/DNSView.js	2011-05-18 04:48:26 UTC (rev 5990)
@@ -0,0 +1,49 @@
+Ext.define('PVE.node.DNSView', {
+    extend: 'PVE.grid.ObjectGrid',
+    alias: ['widget.pveNodeDNSView'],
+
+    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.applyIf(me, {
+	    url: "/api2/json/nodes/" + nodename + "/dns",
+	    cwidth1: 150,
+	    interval: 1000,
+	    rows: {
+		search: { header: 'Search domain', required: true },
+		dns1: { header: 'First DNS server', required: true },
+		dns2: { header: 'Second DNS server' },
+		dns3: { header: 'Third DNS server' },
+	    },
+	    tbar: [ 
+		{
+		    text: "Edit",
+		    handler: run_editor
+		}
+	    ],
+	    listeners: {
+		itemdblclick: function() {
+		    run_editor();
+		}
+	    }
+	});
+
+	me.callParent();
+
+	me.on('show', me.rstore.startUpdate);
+	me.on('hide', me.rstore.stopUpdate);
+	me.on('destroy', me.rstore.stopUpdate);	
+    }
+});

Modified: pve-manager/pve2/www/new/node/TimeView.js
===================================================================
--- pve-manager/pve2/www/new/node/TimeView.js	2011-05-17 13:25:32 UTC (rev 5989)
+++ pve-manager/pve2/www/new/node/TimeView.js	2011-05-18 04:48:26 UTC (rev 5990)
@@ -1,6 +1,6 @@
 Ext.define('PVE.node.TimeView', {
     extend: 'PVE.grid.ObjectGrid',
-    alias: ['widget.PVE.node.TimeView'],
+    alias: ['widget.pveNodeTimeView'],
 
     initComponent : function() {
 	var me = this;
@@ -16,7 +16,7 @@
 	};
 
 	var run_editor = function() {
-	    var win = new PVE.node.TimeEdit({
+	    var win = Ext.create('PVE.node.TimeEdit', {
 		pveSelNode: me.pveSelNode
 	    });
 	    win.show();




More information about the pve-devel mailing list