]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/Config.js
ui: ceph/osd: reintroduce Used column
[pve-manager.git] / www / manager6 / ceph / Config.js
1 Ext.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',
26 width: 100,
27 },
28 {
29 dataIndex: 'mask',
30 text: 'MASK',
31 hidden: true,
32 width: 80,
33 },
34 {
35 dataIndex: 'level',
36 hidden: true,
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',
51 text: 'Runtime Updatable',
52 hidden: true,
53 width: 80,
54 renderer: Proxmox.Utils.format_boolean
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 });
80 Ext.define('PVE.node.CephConfig', {
81 extend: 'Ext.panel.Panel',
82 alias: 'widget.pveNodeCephConfig',
83
84 bodyStyle: 'white-space:pre',
85 bodyPadding: 5,
86 border: false,
87 scrollable: true,
88 load: function() {
89 var me = this;
90
91 Proxmox.Utils.API2Request({
92 url: me.url,
93 waitMsgTarget: me,
94 failure: function(response, opts) {
95 me.update(gettext('Error') + " " + response.htmlStatus);
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
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',
123 listeners: {
124 activate: function() {
125 me.load();
126 }
127 }
128 });
129
130 me.callParent();
131
132 me.load();
133 }
134 });
135
136 Ext.define('PVE.node.CephConfigCrush', {
137 extend: 'Ext.panel.Panel',
138 alias: 'widget.pveNodeCephConfigCrush',
139
140 onlineHelp: 'chapter_pveceph',
141
142 layout: 'border',
143 items: [{
144 title: gettext('Configuration'),
145 xtype: 'pveNodeCephConfig',
146 region: 'center'
147 },
148 {
149 title: 'Crush Map', // do not localize
150 xtype: 'pveNodeCephCrushMap',
151 region: 'east',
152 split: true,
153 width: '50%'
154 },
155 {
156 title: gettext('Configuration Database'),
157 xtype: 'pveNodeCephConfigDb',
158 region: 'south',
159 split: true,
160 weight: -30,
161 height: '50%'
162 }],
163
164 initComponent: function() {
165 var me = this;
166 me.defaults = {
167 pveSelNode: me.pveSelNode
168 };
169 me.callParent();
170 }
171 });