[pve-devel] r6137 - in pve-manager/pve2: . www/manager/dc www/manager/node www/manager/storage

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Jun 21 15:28:18 CEST 2011


Author: dietmar
Date: 2011-06-21 15:28:18 +0200 (Tue, 21 Jun 2011)
New Revision: 6137

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/dc/ACLView.js
   pve-manager/pve2/www/manager/dc/GroupView.js
   pve-manager/pve2/www/manager/dc/RoleView.js
   pve-manager/pve2/www/manager/dc/StorageView.js
   pve-manager/pve2/www/manager/dc/UserView.js
   pve-manager/pve2/www/manager/node/NetworkView.js
   pve-manager/pve2/www/manager/node/ServiceView.js
   pve-manager/pve2/www/manager/storage/ContentView.js
Log:
never define data models twice


Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/ChangeLog	2011-06-21 13:28:18 UTC (rev 6137)
@@ -1,5 +1,8 @@
 2011-06-21  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/*.js: never define data models twice (cause serious
+	browser crash).
+
 	* debian/control.in (Depends): add libfile-sync-perl
 
 2011-06-16  Proxmox Support Team  <support at proxmox.com>

Modified: pve-manager/pve2/www/manager/dc/ACLView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/ACLView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/dc/ACLView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -7,11 +7,7 @@
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: Ext.define('pve-acl', {
-		extend: 'Ext.data.Model',
-		fields: [ 'path', 'type', 'ugid', 'roleid', 
-			  { name: 'propagate', type: 'boolean'} ],
-	    }),
+	    model: 'pve-acl',
 	    proxy: {
                 type: 'pve',
 		url: "/api2/json/access/acl"
@@ -71,4 +67,12 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-acl', {
+	extend: 'Ext.data.Model',
+	fields: [ 'path', 'type', 'ugid', 'roleid', 
+		  { name: 'propagate', type: 'boolean'} ],
+    });
+
 });
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/dc/GroupView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/GroupView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/dc/GroupView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -7,11 +7,7 @@
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: Ext.define('pve-groups', {
-		extend: 'Ext.data.Model',
-		fields: [ 'groupid', 'comment' ],
-		idProperty: 'groupid'
-	    }),
+	    model: 'pve-groups',
 	    proxy: {
                 type: 'pve',
 		url: "/api2/json/access/groups"
@@ -53,4 +49,12 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-groups', {
+	extend: 'Ext.data.Model',
+	fields: [ 'groupid', 'comment' ],
+	idProperty: 'groupid'
+    });
+
 });
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/dc/RoleView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/RoleView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/dc/RoleView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -7,11 +7,7 @@
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: Ext.define('pve-roles', {
-		extend: 'Ext.data.Model',
-		fields: [ 'roleid', 'privs' ],
-		idProperty: 'roleid'
-	    }),
+	    model: 'pve-roles',
 	    proxy: {
                 type: 'pve',
 		url: "/api2/json/access/roles"
@@ -65,4 +61,12 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-roles', {
+	extend: 'Ext.data.Model',
+	fields: [ 'roleid', 'privs' ],
+	idProperty: 'roleid'
+    });
+
 });
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/dc/StorageView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/StorageView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/dc/StorageView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -7,15 +7,7 @@
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: Ext.define('pve-storage', {
-		extend: 'Ext.data.Model',
-		fields: [ 
-		    'path', 'type', 'content', 'server', 'export', 'storage',
-		    { name: 'shared', type: 'boolean'},
-		    { name: 'disable', type: 'boolean'} 
-		],
-		idProperty: 'storage'
-	    }),
+	    model: 'pve-storage',
 	    proxy: {
                 type: 'pve',
 		url: "/api2/json/storage"
@@ -74,4 +66,16 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-storage', {
+	extend: 'Ext.data.Model',
+	fields: [ 
+	    'path', 'type', 'content', 'server', 'export', 'storage',
+	    { name: 'shared', type: 'boolean'},
+	    { name: 'disable', type: 'boolean'} 
+	],
+	idProperty: 'storage'
+    });
+
 });
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/dc/UserView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/UserView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/dc/UserView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -7,15 +7,7 @@
 	var me = this;
 
 	var store = new Ext.data.Store({
-	    model: Ext.define('pve-users', {
-		extend: 'Ext.data.Model',
-		fields: [ 
-		    'userid', 'firstname', 'lastname' , 'email', 'comment',
-		    { type: 'boolean', name: 'enabled' }, 
-		    { type: 'date', dateFormat: 'timestamp', name: 'expire' },
-		],
-		idProperty: 'userid'
-	    }),
+	    model: 'pve-users',
 	    proxy: {
                 type: 'pve',
 		url: "/api2/json/access/users"
@@ -108,4 +100,16 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-users', {
+	extend: 'Ext.data.Model',
+	fields: [ 
+	    'userid', 'firstname', 'lastname' , 'email', 'comment',
+	    { type: 'boolean', name: 'enabled' }, 
+	    { type: 'date', dateFormat: 'timestamp', name: 'expire' },
+	],
+	idProperty: 'userid'
+    });
+
 });
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/node/NetworkView.js
===================================================================
--- pve-manager/pve2/www/manager/node/NetworkView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/node/NetworkView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -13,19 +13,11 @@
 	var rstore = Ext.create('PVE.data.UpdateStore', {
 	    interval: 1000,
 	    storeid: 'pve-networks',
-	    model: Ext.define('pve-networks', {
-		extend: 'Ext.data.Model',
-		fields: [ 
-		    'iface', 'type', 'active', 'autostart',
-		    'bridge_ports', 'slaves', 'address',
-		    'netmask', 'gateway'
-		],
-		idProperty: 'iface',
-		proxy: {
-                    type: 'pve',
-                    url: "/api2/json/nodes/" + nodename + "/network",
-		}
-	    }),
+	    model: 'pve-networks',
+	    proxy: {
+                type: 'pve',
+                url: "/api2/json/nodes/" + nodename + "/network",
+	    },
 	    sorters: [
 		{
 		    property : 'iface',
@@ -278,5 +270,17 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-networks', {
+	extend: 'Ext.data.Model',
+	fields: [ 
+	    'iface', 'type', 'active', 'autostart',
+	    'bridge_ports', 'slaves', 'address',
+	    'netmask', 'gateway'
+	],
+	idProperty: 'iface'
+    });
+
 });
     
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/node/ServiceView.js
===================================================================
--- pve-manager/pve2/www/manager/node/ServiceView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/node/ServiceView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -13,15 +13,11 @@
 	var rstore = Ext.create('PVE.data.UpdateStore', {
 	    interval: 1000,
 	    storeid: 'pve-services',
-	    model: Ext.define('pve-services', {
-		extend: 'Ext.data.Model',
-		fields: [ 'service', 'name', 'desc', 'state' ],
-		idProperty: 'service',
-		proxy: {
-                    type: 'pve',
-                    url: "/api2/json/nodes/" + nodename + "/services",
-		}
-	    })
+	    model: 'pve-services',
+	    proxy: {
+                type: 'pve',
+                url: "/api2/json/nodes/" + nodename + "/services",
+	    }
 	});
 
 	var store = Ext.create('PVE.data.DiffStore', { rstore: rstore });
@@ -147,5 +143,13 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-services', {
+	extend: 'Ext.data.Model',
+	fields: [ 'service', 'name', 'desc', 'state' ],
+	idProperty: 'service'
+    });
+
 });
     
\ No newline at end of file

Modified: pve-manager/pve2/www/manager/storage/ContentView.js
===================================================================
--- pve-manager/pve2/www/manager/storage/ContentView.js	2011-06-21 12:55:15 UTC (rev 6136)
+++ pve-manager/pve2/www/manager/storage/ContentView.js	2011-06-21 13:28:18 UTC (rev 6137)
@@ -15,13 +15,7 @@
 	    throw "no storage ID specified";
 
 	var store = new Ext.data.Store({
-	    model: Ext.define('pve-storage-content', {
-		extend: 'Ext.data.Model',
-		fields: [ 
-		    'volid', 'format', 'size', 'used', 'vmid'
-		],
-		idProperty: 'volid'
-	    }),
+	    model: 'pve-storage-content',
 	    proxy: {
                 type: 'pve',
 		url: "/api2/json/nodes/" + nodename + "/storage/" + storage + "/content"
@@ -67,4 +61,14 @@
 
 	me.callParent();
     }
+}, function() {
+
+    Ext.define('pve-storage-content', {
+	extend: 'Ext.data.Model',
+	fields: [ 
+	    'volid', 'format', 'size', 'used', 'vmid'
+	],
+	idProperty: 'volid'
+    });
+
 });
\ No newline at end of file




More information about the pve-devel mailing list