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

svn-commits at proxmox.com svn-commits at proxmox.com
Tue May 31 08:33:24 CEST 2011


Author: dietmar
Date: 2011-05-31 08:33:24 +0200 (Tue, 31 May 2011)
New Revision: 6056

Added:
   pve-manager/pve2/www/manager/dc/StorageView.js
Modified:
   pve-manager/pve2/www/manager/Makefile.am
   pve-manager/pve2/www/manager/dc/Config.js
Log:
impl. StorageView


Modified: pve-manager/pve2/www/manager/Makefile.am
===================================================================
--- pve-manager/pve2/www/manager/Makefile.am	2011-05-31 06:17:03 UTC (rev 6055)
+++ pve-manager/pve2/www/manager/Makefile.am	2011-05-31 06:33:24 UTC (rev 6056)
@@ -56,6 +56,7 @@
 	qemu/CreateWizard.js				\
 	openvz/CreateWizard.js				\
 	storage/Browser.js				\
+	dc/StorageView.js				\
 	dc/UserView.js					\
 	dc/GroupView.js					\
 	dc/RoleView.js					\

Modified: pve-manager/pve2/www/manager/dc/Config.js
===================================================================
--- pve-manager/pve2/www/manager/dc/Config.js	2011-05-31 06:17:03 UTC (rev 6055)
+++ pve-manager/pve2/www/manager/dc/Config.js	2011-05-31 06:33:24 UTC (rev 6056)
@@ -15,9 +15,9 @@
 		    html: 'summary '
 		},
 		{
+		    xtype: 'pveStorageView',
 		    title: 'Storage',
-		    itemId: 'storage',
-		    html: 'storage '
+		    itemId: 'storage'
 		},
 		{
 		    xtype: 'pveUserView',

Added: pve-manager/pve2/www/manager/dc/StorageView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/StorageView.js	                        (rev 0)
+++ pve-manager/pve2/www/manager/dc/StorageView.js	2011-05-31 06:33:24 UTC (rev 6056)
@@ -0,0 +1,77 @@
+Ext.define('PVE.dc.StorageView', {
+    extend: 'Ext.grid.GridPanel',
+
+    alias: ['widget.pveStorageView'],
+
+    initComponent : function() {
+	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'
+	    }),
+	    proxy: {
+                type: 'pve',
+		url: "/api2/json/storage"
+	    },
+	    sorters: { 
+		property: 'storage', 
+		order: 'DESC' 
+	    }
+	});
+
+
+	Ext.apply(me, {
+	    store: store,
+	    stateful: false,
+	    viewConfig: {
+		trackOver: false
+	    },
+	    columns: [
+		{
+		    header: 'Storage ID',
+		    width: 100,
+		    sortable: true,
+		    dataIndex: 'storage'
+		},
+		{
+		    header: 'Type',
+		    width: 100,
+		    sortable: true,
+		    dataIndex: 'type'
+		},
+		{
+		    header: 'Path',
+		    width: 150,
+		    sortable: true,
+		    dataIndex: 'path'
+		},
+		{
+		    header: 'Shared',
+		    width: 80,
+		    sortable: true,
+		    dataIndex: 'shared'
+		},
+		{
+		    header: 'Disable',
+		    width: 80,
+		    sortable: true,
+		    dataIndex: 'disable'
+		}
+	    ],
+	    listeners: {
+		show: function() {
+		    store.load();
+		}
+	    }
+	});
+
+	me.callParent();
+    }
+});
\ No newline at end of file




More information about the pve-devel mailing list