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