]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/ceph/Config.js
use Button from widget toolkit
[pve-manager.git] / www / manager6 / ceph / Config.js
CommitLineData
7da56687
DM
1Ext.define('PVE.node.CephConfig', {
2 extend: 'Ext.panel.Panel',
7247077d 3 alias: 'widget.pveNodeCephConfig',
7da56687 4
5e0fd1b9
DC
5 bodyStyle: 'white-space:pre',
6 bodyPadding: 5,
56ef9f77 7 border: false,
5e0fd1b9 8 scrollable: true,
7da56687
DM
9 load: function() {
10 var me = this;
c474314e 11
7da56687
DM
12 PVE.Utils.API2Request({
13 url: me.url,
14 waitMsgTarget: me,
15 failure: function(response, opts) {
16 me.update(gettext('Error') + " " + response.htmlStatus);
17 },
18 success: function(response, opts) {
19 var data = response.result.data;
20 me.update(Ext.htmlEncode(data));
21 }
22 });
23 },
24
25 initComponent: function() {
26 var me = this;
27
28 var nodename = me.pveSelNode.data.node;
29 if (!nodename) {
30 throw "no node name specified";
31 }
32
33 Ext.apply(me, {
34 url: '/nodes/' + nodename + '/ceph/config',
7da56687 35 listeners: {
50c30860 36 activate: function() {
7da56687
DM
37 me.load();
38 }
39 }
40 });
41
42 me.callParent();
43
44 me.load();
45 }
46});
47
7247077d
DC
48Ext.define('PVE.node.CephConfigCrush', {
49 extend: 'Ext.panel.Panel',
50 alias: 'widget.pveNodeCephConfigCrush',
51
ba93a9c6
DC
52 onlineHelp: 'chapter_pveceph',
53
7247077d
DC
54 layout: 'border',
55 items: [{
7e3e04e6 56 title: gettext('Configuration'),
7247077d
DC
57 xtype: 'pveNodeCephConfig',
58 region: 'center'
59 },
60 {
2ce6111f 61 title: 'Crush Map', // do not localize
7247077d
DC
62 xtype: 'pveNodeCephCrushMap',
63 region: 'east',
64 split: true,
361aafd0 65 width: '50%'
7247077d
DC
66 }],
67
68 initComponent: function() {
69 var me = this;
70 me.defaults = {
71 pveSelNode: me.pveSelNode
72 };
73 me.callParent();
74 }
75});