]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/Crush.js
bump version to 8.2.7
[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(
20 me.ownerCt,
21 msg,
22 me.pveSelNode.data.node,
23 win => me.mon(win, 'cephInstallWindowClosed', () => me.load()),
24 );
25 },
26 success: function(response, opts) {
27 var data = response.result.data;
28 me.update(Ext.htmlEncode(data));
29 },
30 });
31 },
32
33 initComponent: function() {
34 let me = this;
35
36 let nodename = me.pveSelNode.data.node;
37 if (!nodename) {
38 throw "no node name specified";
39 }
40
41 Ext.apply(me, {
42 url: `/nodes/${nodename}/ceph/crush`,
43 listeners: {
44 activate: () => me.load(),
45 },
46 });
47
48 me.callParent();
49
50 me.load();
51 },
52 });