]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/Config.js
use Proxmox.Utils instead of PVE.Utils
[pve-manager.git] / www / manager6 / ceph / Config.js
1 Ext.define('PVE.node.CephConfig', {
2 extend: 'Ext.panel.Panel',
3 alias: 'widget.pveNodeCephConfig',
4
5 bodyStyle: 'white-space:pre',
6 bodyPadding: 5,
7 border: false,
8 scrollable: true,
9 load: function() {
10 var me = this;
11
12 Proxmox.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',
35 listeners: {
36 activate: function() {
37 me.load();
38 }
39 }
40 });
41
42 me.callParent();
43
44 me.load();
45 }
46 });
47
48 Ext.define('PVE.node.CephConfigCrush', {
49 extend: 'Ext.panel.Panel',
50 alias: 'widget.pveNodeCephConfigCrush',
51
52 onlineHelp: 'chapter_pveceph',
53
54 layout: 'border',
55 items: [{
56 title: gettext('Configuration'),
57 xtype: 'pveNodeCephConfig',
58 region: 'center'
59 },
60 {
61 title: 'Crush Map', // do not localize
62 xtype: 'pveNodeCephCrushMap',
63 region: 'east',
64 split: true,
65 width: '50%'
66 }],
67
68 initComponent: function() {
69 var me = this;
70 me.defaults = {
71 pveSelNode: me.pveSelNode
72 };
73 me.callParent();
74 }
75 });