From b1ab274bdd44e2fe3c805df60e9c992be270f1cd Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 4 Mar 2016 06:14:49 +0100 Subject: [PATCH] copy ceph/Crush.js from manager to manager6 --- www/manager6/ceph/Crush.js | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 www/manager6/ceph/Crush.js 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(); + } +});