]>
git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/window/ZFSDetail.js
1 Ext
.define('Proxmox.window.ZFSDetail', {
2 extend
: 'Ext.window.Window',
3 alias
: 'widget.pmxZFSDetail',
4 mixins
: ['Proxmox.Mixin.CBind'],
6 cbindData: function(initialConfig
) {
8 me
.url
= `/nodes/${me.nodename}/disks/zfs/${encodeURIComponent(me.zpool)}`;
10 zpoolUri
: `/api2/json/${me.url}`,
11 title
: `${gettext('Status')}: ${me.zpool}`,
16 xclass
: 'Ext.app.ViewController',
20 let view
= me
.getView();
21 me
.lookup('status').reload();
23 Proxmox
.Utils
.API2Request({
24 url
: `/api2/extjs/${view.url}`,
27 failure: function(response
, opts
) {
28 Proxmox
.Utils
.setErrorMask(view
, response
.htmlStatus
);
30 success: function(response
, opts
) {
31 let devices
= me
.lookup('devices');
32 devices
.getSelectionModel().deselectAll();
33 devices
.setRootNode(response
.result
.data
);
39 init: function(view
) {
41 Proxmox
.Utils
.monStoreErrors(me
, me
.lookup('status').getStore().rstore
);
65 text
: gettext('Reload'),
66 iconCls
: 'fa fa-refresh',
73 xtype
: 'proxmoxObjectGrid',
78 nodename
: '{nodename}',
82 header
: gettext('Scan'),
85 header
: gettext('Status'),
88 header
: gettext('Action'),
91 header
: gettext('Errors'),
98 title
: gettext('Devices'),
100 stateId
: 'grid-node-zfsstatus',
102 fields
: ['name', 'status',
106 calculate: function(data
) {
107 var txt
= 'fa x-fa-tree fa-';
109 return txt
+ 'hdd-o';
119 nodename
: '{nodename}',
124 text
: gettext('Name'),
129 text
: gettext('Health'),
130 renderer
: Proxmox
.Utils
.render_zfs_health
,
146 text
: gettext('Message'),