]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/Crush.js
use Button from widget toolkit
[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 PVE.Utils.API2Request({
14 url: me.url,
15 waitMsgTarget: me,
16 failure: function(response, opts) {
17 me.update(gettext('Error') + " " + response.htmlStatus);
18 },
19 success: function(response, opts) {
20 var data = response.result.data;
21 me.update(Ext.htmlEncode(data));
22 }
23 });
24 },
25
26 initComponent: function() {
27 var me = this;
28
29 var nodename = me.pveSelNode.data.node;
30 if (!nodename) {
31 throw "no node name specified";
32 }
33
34 Ext.apply(me, {
35 url: '/nodes/' + nodename + '/ceph/crush',
36
37 listeners: {
38 activate: function() {
39 me.load();
40 }
41 }
42 });
43
44 me.callParent();
45
46 me.load();
47 }
48 });