]>
Commit | Line | Data |
---|---|---|
3af21bae DC |
1 | Ext.define('PVE.node.CephConfigDb', { |
2 | extend: 'Ext.grid.Panel', | |
3 | alias: 'widget.pveNodeCephConfigDb', | |
4 | ||
5 | border: false, | |
cdb828c7 DC |
6 | store: { |
7 | proxy: { | |
f6710aac TL |
8 | type: 'proxmox', |
9 | }, | |
3af21bae DC |
10 | }, |
11 | ||
12 | columns: [ | |
13 | { | |
14 | dataIndex: 'section', | |
15 | text: 'WHO', | |
f9bbe5fe | 16 | width: 100, |
3af21bae DC |
17 | }, |
18 | { | |
19 | dataIndex: 'mask', | |
20 | text: 'MASK', | |
f9bbe5fe | 21 | hidden: true, |
3af21bae DC |
22 | width: 80, |
23 | }, | |
24 | { | |
25 | dataIndex: 'level', | |
f9bbe5fe | 26 | hidden: true, |
3af21bae DC |
27 | text: 'LEVEL', |
28 | }, | |
29 | { | |
30 | dataIndex: 'name', | |
31 | flex: 1, | |
32 | text: 'OPTION', | |
33 | }, | |
34 | { | |
35 | dataIndex: 'value', | |
36 | flex: 1, | |
37 | text: 'VALUE', | |
38 | }, | |
39 | { | |
40 | dataIndex: 'can_update_at_runtime', | |
f9bbe5fe TL |
41 | text: 'Runtime Updatable', |
42 | hidden: true, | |
43 | width: 80, | |
f6710aac | 44 | renderer: Proxmox.Utils.format_boolean, |
3af21bae DC |
45 | }, |
46 | ], | |
47 | ||
48 | initComponent: function() { | |
49 | var me = this; | |
50 | ||
51 | var nodename = me.pveSelNode.data.node; | |
52 | if (!nodename) { | |
53 | throw "no node name specified"; | |
54 | } | |
55 | ||
5eb30256 | 56 | me.store.proxy.url = '/api2/json/nodes/' + nodename + '/ceph/cfg/db'; |
3af21bae DC |
57 | |
58 | me.callParent(); | |
59 | ||
cdb828c7 DC |
60 | Proxmox.Utils.monStoreErrors(me, me.getStore()); |
61 | me.getStore().load(); | |
f6710aac | 62 | }, |
3af21bae | 63 | }); |
7da56687 DM |
64 | Ext.define('PVE.node.CephConfig', { |
65 | extend: 'Ext.panel.Panel', | |
7247077d | 66 | alias: 'widget.pveNodeCephConfig', |
7da56687 | 67 | |
5e0fd1b9 DC |
68 | bodyStyle: 'white-space:pre', |
69 | bodyPadding: 5, | |
56ef9f77 | 70 | border: false, |
5e0fd1b9 | 71 | scrollable: true, |
7da56687 DM |
72 | load: function() { |
73 | var me = this; | |
c474314e | 74 | |
e7ade592 | 75 | Proxmox.Utils.API2Request({ |
7da56687 DM |
76 | url: me.url, |
77 | waitMsgTarget: me, | |
78 | failure: function(response, opts) { | |
79 | me.update(gettext('Error') + " " + response.htmlStatus); | |
4616a55b TM |
80 | var msg = response.htmlStatus; |
81 | PVE.Utils.showCephInstallOrMask(me.ownerCt, msg, me.pveSelNode.data.node, | |
8058410f TL |
82 | function(win) { |
83 | me.mon(win, 'cephInstallWindowClosed', function() { | |
4616a55b TM |
84 | me.load(); |
85 | }); | |
f6710aac | 86 | }, |
4616a55b | 87 | ); |
7da56687 DM |
88 | }, |
89 | success: function(response, opts) { | |
90 | var data = response.result.data; | |
91 | me.update(Ext.htmlEncode(data)); | |
f6710aac | 92 | }, |
7da56687 DM |
93 | }); |
94 | }, | |
95 | ||
96 | initComponent: function() { | |
97 | var me = this; | |
98 | ||
99 | var nodename = me.pveSelNode.data.node; | |
100 | if (!nodename) { | |
101 | throw "no node name specified"; | |
102 | } | |
103 | ||
104 | Ext.apply(me, { | |
5eb30256 | 105 | url: '/nodes/' + nodename + '/ceph/cfg/raw', |
7da56687 | 106 | listeners: { |
50c30860 | 107 | activate: function() { |
7da56687 | 108 | me.load(); |
f6710aac TL |
109 | }, |
110 | }, | |
7da56687 DM |
111 | }); |
112 | ||
113 | me.callParent(); | |
114 | ||
115 | me.load(); | |
f6710aac | 116 | }, |
7da56687 DM |
117 | }); |
118 | ||
7247077d DC |
119 | Ext.define('PVE.node.CephConfigCrush', { |
120 | extend: 'Ext.panel.Panel', | |
121 | alias: 'widget.pveNodeCephConfigCrush', | |
122 | ||
ba93a9c6 DC |
123 | onlineHelp: 'chapter_pveceph', |
124 | ||
7247077d DC |
125 | layout: 'border', |
126 | items: [{ | |
7e3e04e6 | 127 | title: gettext('Configuration'), |
7247077d | 128 | xtype: 'pveNodeCephConfig', |
f6710aac | 129 | region: 'center', |
7247077d DC |
130 | }, |
131 | { | |
2ce6111f | 132 | title: 'Crush Map', // do not localize |
7247077d DC |
133 | xtype: 'pveNodeCephCrushMap', |
134 | region: 'east', | |
135 | split: true, | |
f6710aac | 136 | width: '50%', |
3af21bae DC |
137 | }, |
138 | { | |
139 | title: gettext('Configuration Database'), | |
140 | xtype: 'pveNodeCephConfigDb', | |
141 | region: 'south', | |
142 | split: true, | |
143 | weight: -30, | |
f6710aac | 144 | height: '50%', |
7247077d DC |
145 | }], |
146 | ||
147 | initComponent: function() { | |
148 | var me = this; | |
149 | me.defaults = { | |
f6710aac | 150 | pveSelNode: me.pveSelNode, |
7247077d DC |
151 | }; |
152 | me.callParent(); | |
f6710aac | 153 | }, |
7247077d | 154 | }); |