Signed-off-by: Tim Marx <[email protected]>
---
 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

_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to