[pve-devel] [PATCH manager 2/2] gui: ceph: show config database under the config
Dominik Csapak
d.csapak at proxmox.com
Fri Jul 5 09:16:34 CEST 2019
the column titles are the same as the 'ceph config dump' cli
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/ceph/Config.js | 84 +++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/www/manager6/ceph/Config.js b/www/manager6/ceph/Config.js
index 46364690..fc9e4d69 100644
--- a/www/manager6/ceph/Config.js
+++ b/www/manager6/ceph/Config.js
@@ -1,3 +1,79 @@
+Ext.define('PVE.node.CephConfigDb', {
+ extend: 'Ext.grid.Panel',
+ alias: 'widget.pveNodeCephConfigDb',
+
+ border: false,
+ load: function() {
+ var me = this;
+
+ Proxmox.Utils.API2Request({
+ url: me.url,
+ waitMsgTarget: me,
+ failure: function(response, opts) {
+ console.log(response);
+ },
+ success: function(response, opts) {
+ var data = response.result.data;
+ me.getStore().setData(data);
+ }
+ });
+ },
+
+ columns: [
+ {
+ dataIndex: 'section',
+ text: 'WHO',
+ width: 80,
+ },
+ {
+ dataIndex: 'mask',
+ text: 'MASK',
+ width: 80,
+ },
+ {
+ dataIndex: 'level',
+ text: 'LEVEL',
+ },
+ {
+ dataIndex: 'name',
+ flex: 1,
+ text: 'OPTION',
+ },
+ {
+ dataIndex: 'value',
+ flex: 1,
+ text: 'VALUE',
+ },
+ {
+ dataIndex: 'can_update_at_runtime',
+ text: 'RO',
+ width: 50,
+ renderer: Proxmox.Utils.format_neg_boolean
+ },
+ ],
+
+ initComponent: function() {
+ var me = this;
+
+ var nodename = me.pveSelNode.data.node;
+ if (!nodename) {
+ throw "no node name specified";
+ }
+
+ Ext.apply(me, {
+ url: '/nodes/' + nodename + '/ceph/configdb',
+ listeners: {
+ activate: function() {
+ me.load();
+ }
+ }
+ });
+
+ me.callParent();
+
+ me.load();
+ }
+});
Ext.define('PVE.node.CephConfig', {
extend: 'Ext.panel.Panel',
alias: 'widget.pveNodeCephConfig',
@@ -72,6 +148,14 @@ Ext.define('PVE.node.CephConfigCrush', {
region: 'east',
split: true,
width: '50%'
+ },
+ {
+ title: gettext('Configuration Database'),
+ xtype: 'pveNodeCephConfigDb',
+ region: 'south',
+ split: true,
+ weight: -30,
+ height: '50%'
}],
initComponent: function() {
--
2.20.1
More information about the pve-devel
mailing list