[pve-devel] r6217 - in pve-manager/pve2: . www/manager

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Jul 1 09:31:42 CEST 2011


Author: dietmar
Date: 2011-07-01 09:31:42 +0200 (Fri, 01 Jul 2011)
New Revision: 6217

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/PVEUtils.js
Log:
PVEUtils.js: do nou use 'singleton: true'


Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2011-07-01 06:40:41 UTC (rev 6216)
+++ pve-manager/pve2/ChangeLog	2011-07-01 07:31:42 UTC (rev 6217)
@@ -1,5 +1,8 @@
 2011-07-01  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/PVEUtils.js: do nou use 'singleton: true' - that
+	seems to conflict with statics definition
+
 	* www/manager/dc/UserEdit.js: add file from Seth Lauzon, fixed urls
 
 2011-06-30  Proxmox Support Team  <support at proxmox.com>

Modified: pve-manager/pve2/www/manager/PVEUtils.js
===================================================================
--- pve-manager/pve2/www/manager/PVEUtils.js	2011-07-01 06:40:41 UTC (rev 6216)
+++ pve-manager/pve2/www/manager/PVEUtils.js	2011-07-01 07:31:42 UTC (rev 6217)
@@ -49,79 +49,75 @@
     isDirty: function() { return false; }
 });
 
-Ext.define('PVE.Utils', {
-    singleton: true,
+Ext.define('PVE.Utils', { statics: {
 
-    statics: {
+    // this class only contains static functions
 
-	log_severity_hash: {
-	    0: "panic",
-	    1: "alert",
-	    2: "critical",
-	    3: "error",
-	    4: "warning",
-	    5: "notice",
-	    6: "info",
-	    7: "debug"
-	},
+    log_severity_hash: {
+	0: "panic",
+	1: "alert",
+	2: "critical",
+	3: "error",
+	4: "warning",
+	5: "notice",
+	6: "info",
+	7: "debug"
+    },
 
-	kvm_keymaps: {
-	    ar: 'Arabic',
-	    da: 'Danish',
-	    de: 'German', 
-	    'de-ch': 'German (Swiss)', 
-	    'en-gb': 'English (UK)', 
-	    'en-us': 'English (USA',
-	    es: 'Spanish',
-	    et: 'Estonia',
-	    fi: 'Finnish',
-	    fo: 'Faroe Islands', 
-	    fr: 'French', 
-	    'fr-be': 'French (Belgium)', 
-	    'fr-ca': 'French (Canada)',
-	    'fr-ch': 'French (Swiss)',
-	    hr: 'Croatia',
-	    hu: 'Hungarian',
-	    is: 'Icelandic',
-	    it: 'Italian', 
-	    ja: 'Japanese',
-	    lt: 'Lithuanian',
-	    lv: 'Latvian',
-	    mk: 'Macedonian', 
-	    nl: 'Dutch',
-	    'nl-be': 'Dutch (Belgium)',
-	    no: 'Norwegian', 
-	    pl: 'Polish',
-	    pt: 'Portuguese',
-	    'pt-br': 'Portuguese (Brazil)',
-	    ru: 'Russian',
-	    sl: 'Slovenian',
-	    sv: 'Swedish',
-	    th: 'Thai',
-	    tr: 'Turkish'
-	},
+    kvm_keymaps: {
+	ar: 'Arabic',
+	da: 'Danish',
+	de: 'German', 
+	'de-ch': 'German (Swiss)', 
+	'en-gb': 'English (UK)', 
+	'en-us': 'English (USA',
+	es: 'Spanish',
+	et: 'Estonia',
+	fi: 'Finnish',
+	fo: 'Faroe Islands', 
+	fr: 'French', 
+	'fr-be': 'French (Belgium)', 
+	'fr-ca': 'French (Canada)',
+	'fr-ch': 'French (Swiss)',
+	hr: 'Croatia',
+	hu: 'Hungarian',
+	is: 'Icelandic',
+	it: 'Italian', 
+	ja: 'Japanese',
+	lt: 'Lithuanian',
+	lv: 'Latvian',
+	mk: 'Macedonian', 
+	nl: 'Dutch',
+	'nl-be': 'Dutch (Belgium)',
+	no: 'Norwegian', 
+	pl: 'Polish',
+	pt: 'Portuguese',
+	'pt-br': 'Portuguese (Brazil)',
+	ru: 'Russian',
+	sl: 'Slovenian',
+	sv: 'Swedish',
+	th: 'Thai',
+	tr: 'Turkish'
+    },
 
-	kvm_vga_drivers: {
-	    std: 'Standard VGA',
-	    vmware: 'VMWare compatible',
-	    cirrus: 'Cirrus Logic GD5446'
-	}
+    kvm_vga_drivers: {
+	std: 'Standard VGA',
+	vmware: 'VMWare compatible',
+	cirrus: 'Cirrus Logic GD5446'
     },
 
     render_kvm_language: function (value) {
 	if (!value)
 	    return 'Default';
-	var text = PVE.Utils.statics().kvm_keymaps[value];
+	var text = PVE.Utils.kvm_keymaps[value];
 	if (text) 
 	    return text + ' (' + value + ')';
 	return value;
     },
 
     kvm_keymap_array: function() {
-	var keymaps = PVE.Utils.statics().kvm_keymaps;
-
 	var data = [['', PVE.Utils.render_kvm_language('')]];
-	Ext.Object.each(keymaps, function(key, value) {
+	Ext.Object.each(PVE.Utils.kvm_keymaps, function(key, value) {
 	    data.push([key, PVE.Utils.render_kvm_language(value)]);
 	});
 
@@ -131,17 +127,15 @@
     render_kvm_vga_driver: function (value) {
 	if (!value)
 	    return 'Default (cirrus)';
-	var text = PVE.Utils.statics().kvm_vga_drivers[value];
+	var text = PVE.Utils.kvm_vga_drivers[value];
 	if (text) 
 	    return text + ' (' + value + ')';
 	return value;
     },
 
     kvm_vga_driver_array: function() {
-	var drivers = PVE.Utils.statics().kvm_vga_drivers;
-
 	var data = [['', PVE.Utils.render_kvm_vga_driver('')]];
-	Ext.Object.each(drivers, function(key, value) {
+	Ext.Object.each(PVE.Utils.kvm_vga_drivers, function(key, value) {
 	    data.push([key, PVE.Utils.render_kvm_vga_driver(value)]);
 	});
 
@@ -425,7 +419,7 @@
     },
 
     render_serverity: function (value) {
-	return PVE.Utils.statics().log_severity_hash[value] || value;
+	return PVE.Utils.log_severity_hash[value] || value;
     },
 
     render_cpu: function(value, metaData, record, rowIndex, colIndex, store) {
@@ -511,5 +505,5 @@
 
 	return PVE.Utils.format_task_description(type, id);
     }
-});
+}});
 




More information about the pve-devel mailing list