]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/Crush.js
ui: ceph/osd: split out used% and total avail column
[pve-manager.git] / www / manager6 / ceph / Crush.js
1 Ext.define('PVE.node.CephCrushMap', {
2 extend: 'Ext.panel.Panel',
3 alias: ['widget.pveNodeCephCrushMap'],
4 bodyStyle: 'white-space:pre',
5 bodyPadding: 5,
6 border: false,
7 stateful: true,
8 stateId: 'layout-ceph-crush',
9 scrollable: true,
10 load: function() {
11 var me = this;
12
13 Proxmox.Utils.API2Request({
14 url: me.url,
15 waitMsgTarget: me,
16 failure: function(response, opts) {
17 me.update(gettext('Error') + " " + response.htmlStatus);
18 var msg = response.htmlStatus;
19 PVE.Utils.showCephInstallOrMask(me.ownerCt, msg, me.pveSelNode.data.node,
20 function(win){
21 me.mon(win, 'cephInstallWindowClosed', function(){
22 me.load();
23 });
24 }
25 );
26 },
27 success: function(response, opts) {
28 var data = response.result.data;
29 me.update(Ext.htmlEncode(data));
30 }
31 });
32 },
33
34 initComponent: function() {
35 var me = this;
36
37 var nodename = me.pveSelNode.data.node;
38 if (!nodename) {
39 throw "no node name specified";
40 }
41
42 Ext.apply(me, {
43 url: '/nodes/' + nodename + '/ceph/crush',
44
45 listeners: {
46 activate: function() {
47 me.load();
48 }
49 }
50 });
51
52 me.callParent();
53
54 me.load();
55 }
56 });