diff --git a/www/manager6/ceph/Crush.js b/www/manager6/ceph/Crush.js new file mode 100644 index 00000000..c1c498d9 --- /dev/null +++ b/www/manager6/ceph/Crush.js @@ -0,0 +1,45 @@ +Ext.define('PVE.node.CephCrushMap', { + extend: 'Ext.panel.Panel', + alias: ['widget.pveNodeCephCrushMap'], + + load: function() { + var me = this; + + PVE.Utils.API2Request({ + url: me.url, + waitMsgTarget: me, + failure: function(response, opts) { + me.update(gettext('Error') + " " + response.htmlStatus); + }, + success: function(response, opts) { + var data = response.result.data; + me.update(Ext.htmlEncode(data)); + } + }); + }, + + 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/crush', + bodyStyle: 'white-space:pre', + bodyPadding: 5, + autoScroll: true, + listeners: { + show: function() { + me.load(); + } + } + }); + + me.callParent(); + + me.load(); + } +});