mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 16:00:34 +00:00

Signed-off-by: Tim Marx <t.marx@proxmox.com> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
85 lines
1.6 KiB
JavaScript
85 lines
1.6 KiB
JavaScript
Ext.define('PVE.node.CephConfig', {
|
|
extend: 'Ext.panel.Panel',
|
|
alias: 'widget.pveNodeCephConfig',
|
|
|
|
bodyStyle: 'white-space:pre',
|
|
bodyPadding: 5,
|
|
border: false,
|
|
scrollable: true,
|
|
load: function() {
|
|
var me = this;
|
|
|
|
Proxmox.Utils.API2Request({
|
|
url: me.url,
|
|
waitMsgTarget: me,
|
|
failure: function(response, opts) {
|
|
me.update(gettext('Error') + " " + response.htmlStatus);
|
|
var msg = response.htmlStatus;
|
|
PVE.Utils.showCephInstallOrMask(me.ownerCt, msg, me.pveSelNode.data.node,
|
|
function(win){
|
|
me.mon(win, 'cephInstallWindowClosed', function(){
|
|
me.load();
|
|
});
|
|
}
|
|
);
|
|
|
|
},
|
|
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/config',
|
|
listeners: {
|
|
activate: function() {
|
|
me.load();
|
|
}
|
|
}
|
|
});
|
|
|
|
me.callParent();
|
|
|
|
me.load();
|
|
}
|
|
});
|
|
|
|
Ext.define('PVE.node.CephConfigCrush', {
|
|
extend: 'Ext.panel.Panel',
|
|
alias: 'widget.pveNodeCephConfigCrush',
|
|
|
|
onlineHelp: 'chapter_pveceph',
|
|
|
|
layout: 'border',
|
|
items: [{
|
|
title: gettext('Configuration'),
|
|
xtype: 'pveNodeCephConfig',
|
|
region: 'center'
|
|
},
|
|
{
|
|
title: 'Crush Map', // do not localize
|
|
xtype: 'pveNodeCephCrushMap',
|
|
region: 'east',
|
|
split: true,
|
|
width: '50%'
|
|
}],
|
|
|
|
initComponent: function() {
|
|
var me = this;
|
|
me.defaults = {
|
|
pveSelNode: me.pveSelNode
|
|
};
|
|
me.callParent();
|
|
}
|
|
});
|