[pve-devel] [PATCH manager 2/4] node zfs: added new component to display additional zfs details

Tim Marx t.marx at proxmox.com
Wed Oct 31 14:03:16 CET 2018


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 www/manager6/node/ZFS.js | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/www/manager6/node/ZFS.js b/www/manager6/node/ZFS.js
index c28e20c9..9314e45e 100644
--- a/www/manager6/node/ZFS.js
+++ b/www/manager6/node/ZFS.js
@@ -262,6 +262,69 @@ Ext.define('PVE.node.ZFSStatus', {
     }
 });
 
+Ext.define('PVE.node.ZFSStatus', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'pveZFSStatus',
+    layout: 'fit',
+    border: false,
+    hideHeaders: true,
+    columns: [
+	{
+	    dataIndex: 'key'
+	},
+	{
+	    dataIndex: 'value',
+	    flex: 1
+	}
+    ],
+
+
+    initComponent: function() {
+	 /*jslint confusion: true */
+        var me = this;
+
+	if (!me.nodename) {
+	    throw "no node name specified";
+	}
+
+	if (!me.zpool) {
+	    throw "no zpool specified";
+	}
+	
+	var rows = {
+	    scan: {
+		header: gettext('Scan')
+	    },
+	    status: {
+		header: gettext('Status')
+	    },
+	    action: {
+		header: gettext('Action')
+	    },
+	    errors: {
+		header: gettext('Errors')
+	    }
+	};
+	
+	
+	me.store = {
+	    model: 'KeyValue',
+	    proxy: {
+		type: 'proxmox',
+		url: "/api2/extjs/nodes/" + me.nodename + "/disks/zfs/" + me.zpool,
+		reader: {
+		    type: 'jsonobject',
+		    rows: rows,
+		    rootProperty: 'data'
+		}
+	    }
+	};
+	
+	me.callParent();
+	me.store.load();
+    }
+});
+
 Ext.define('PVE.node.ZFSList', {
     extend: 'Ext.grid.Panel',
     xtype: 'pveZFSList',
-- 
2.11.0




More information about the pve-devel mailing list