]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/Config.js
ui: fix align mode of two column container
[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 scrollable: true,
8 load: function() {
9 var me = this;
10
11 PVE.Utils.API2Request({
12 url: me.url,
13 waitMsgTarget: me,
14 failure: function(response, opts) {
15 me.update(gettext('Error') + " " + response.htmlStatus);
16 },
17 success: function(response, opts) {
18 var data = response.result.data;
19 me.update(Ext.htmlEncode(data));
20 }
21 });
22 },
23
24 initComponent: function() {
25 var me = this;
26
27 var nodename = me.pveSelNode.data.node;
28 if (!nodename) {
29 throw "no node name specified";
30 }
31
32 Ext.apply(me, {
33 url: '/nodes/' + nodename + '/ceph/config',
34 listeners: {
35 activate: function() {
36 me.load();
37 }
38 }
39 });
40
41 me.callParent();
42
43 me.load();
44 }
45 });
46
47 Ext.define('PVE.node.CephConfigCrush', {
48 extend: 'Ext.panel.Panel',
49 alias: 'widget.pveNodeCephConfigCrush',
50
51 layout: 'border',
52 items: [{
53 title: gettext('Ceph Config'),
54 xtype: 'pveNodeCephConfig',
55 region: 'center'
56 },
57 {
58 title: gettext('Crush Map'),
59 xtype: 'pveNodeCephCrushMap',
60 region: 'east',
61 split: true,
62 flex: 1
63 }],
64
65 initComponent: function() {
66 var me = this;
67 me.defaults = {
68 pveSelNode: me.pveSelNode
69 };
70 me.callParent();
71 }
72 });