[pve-devel] [PATCH v3 manager 2/3] node zfs: added new component to display additional zfs details
Tim Marx
t.marx at proxmox.com
Mon Nov 12 11:41:14 CET 2018
ZFSStatus component got renamed to ZFSDevices to clarify that it only displays
the device tree of the status command. The newly added component is now named
ZFSStatus instead.
Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
www/manager6/node/ZFS.js | 62 ++++++++++++++++++++++++++++++++----------------
1 file changed, 42 insertions(+), 20 deletions(-)
diff --git a/www/manager6/node/ZFS.js b/www/manager6/node/ZFS.js
index cd4b75a6..e341a360 100644
--- a/www/manager6/node/ZFS.js
+++ b/www/manager6/node/ZFS.js
@@ -163,9 +163,9 @@ Ext.define('PVE.node.CreateZFS', {
}
});
-Ext.define('PVE.node.ZFSStatus', {
+Ext.define('PVE.node.ZFSDevices', {
extend: 'Ext.tree.Panel',
- xtype: 'pveZFSStatus',
+ xtype: 'pveZFSDevices',
stateful: true,
stateId: 'grid-node-zfsstatus',
columns: [
@@ -200,17 +200,6 @@ Ext.define('PVE.node.ZFSStatus', {
rootVisible: true,
- tbar: [
- {
- text: gettext('Reload'),
- iconCls: 'fa fa-refresh',
- handler: function() {
- var me = this.up('panel');
- me.reload();
- }
- }
- ],
-
reload: function() {
var me = this;
var sm = me.getSelectionModel();
@@ -229,13 +218,6 @@ Ext.define('PVE.node.ZFSStatus', {
});
},
- listeners: {
- activate: function() {
- var me = this;
- me.reload();
- }
- },
-
initComponent: function() {
/*jslint confusion: true */
var me = this;
@@ -273,6 +255,46 @@ Ext.define('PVE.node.ZFSStatus', {
}
});
+Ext.define('PVE.node.ZFSStatus', {
+ extend: 'Proxmox.grid.ObjectGrid',
+ xtype: 'pveZFSStatus',
+ layout: 'fit',
+ border: false,
+
+ initComponent: function() {
+ /*jslint confusion: true */
+ var me = this;
+
+ if (!me.nodename) {
+ throw "no node name specified";
+ }
+
+ if (!me.zpool) {
+ throw "no zpool specified";
+ }
+
+ me.url = "/api2/extjs/nodes/" + me.nodename + "/disks/zfs/" + me.zpool;
+
+ me.rows = {
+ scan: {
+ header: gettext('Scan')
+ },
+ status: {
+ header: gettext('Status')
+ },
+ action: {
+ header: gettext('Action')
+ },
+ errors: {
+ header: gettext('Errors')
+ }
+ };
+
+ me.callParent();
+ me.reload();
+ }
+});
+
Ext.define('PVE.node.ZFSList', {
extend: 'Ext.grid.Panel',
xtype: 'pveZFSList',
--
2.11.0
More information about the pve-devel
mailing list