]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/ceph/Crush.js
ui: eslint: fix trailing comma and comma related whitespaces errors
[pve-manager.git] / www / manager6 / ceph / Crush.js
CommitLineData
b1ab274b
DM
1Ext.define('PVE.node.CephCrushMap', {
2 extend: 'Ext.panel.Panel',
3 alias: ['widget.pveNodeCephCrushMap'],
5e0fd1b9
DC
4 bodyStyle: 'white-space:pre',
5 bodyPadding: 5,
56ef9f77 6 border: false,
361aafd0
DC
7 stateful: true,
8 stateId: 'layout-ceph-crush',
5e0fd1b9 9 scrollable: true,
b1ab274b
DM
10 load: function() {
11 var me = this;
c474314e 12
e7ade592 13 Proxmox.Utils.API2Request({
b1ab274b
DM
14 url: me.url,
15 waitMsgTarget: me,
16 failure: function(response, opts) {
17 me.update(gettext('Error') + " " + response.htmlStatus);
4616a55b
TM
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 });
f6710aac 24 },
4616a55b 25 );
b1ab274b
DM
26 },
27 success: function(response, opts) {
28 var data = response.result.data;
29 me.update(Ext.htmlEncode(data));
f6710aac 30 },
b1ab274b
DM
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',
5e0fd1b9 44
b1ab274b 45 listeners: {
5e0fd1b9 46 activate: function() {
b1ab274b 47 me.load();
f6710aac
TL
48 },
49 },
b1ab274b
DM
50 });
51
52 me.callParent();
53
54 me.load();
f6710aac 55 },
b1ab274b 56});