2016-03-04 06:14:49 +01:00
Ext . define ( 'PVE.node.CephConfig' , {
extend : 'Ext.panel.Panel' ,
2016-08-22 17:13:39 +02:00
alias : 'widget.pveNodeCephConfig' ,
2016-03-04 06:14:49 +01:00
2016-03-04 09:28:30 +01:00
bodyStyle : 'white-space:pre' ,
bodyPadding : 5 ,
2016-11-08 10:52:25 +01:00
border : false ,
2016-03-04 09:28:30 +01:00
scrollable : true ,
2016-03-04 06:14:49 +01:00
load : function ( ) {
var me = this ;
2016-03-04 09:28:34 +01:00
2016-03-04 06:14:49 +01:00
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/config' ,
listeners : {
2016-03-16 15:58:12 +01:00
activate : function ( ) {
2016-03-04 06:14:49 +01:00
me . load ( ) ;
}
}
} ) ;
me . callParent ( ) ;
me . load ( ) ;
}
} ) ;
2016-08-22 17:13:39 +02:00
Ext . define ( 'PVE.node.CephConfigCrush' , {
extend : 'Ext.panel.Panel' ,
alias : 'widget.pveNodeCephConfigCrush' ,
2016-11-02 16:57:10 +01:00
onlineHelp : 'chapter_pveceph' ,
2016-08-22 17:13:39 +02:00
layout : 'border' ,
items : [ {
title : gettext ( 'Ceph Config' ) ,
xtype : 'pveNodeCephConfig' ,
region : 'center'
} ,
{
title : gettext ( 'Crush Map' ) ,
xtype : 'pveNodeCephCrushMap' ,
region : 'east' ,
split : true ,
2016-11-08 10:50:47 +01:00
width : '50%'
2016-08-22 17:13:39 +02:00
} ] ,
initComponent : function ( ) {
var me = this ;
me . defaults = {
pveSelNode : me . pveSelNode
} ;
me . callParent ( ) ;
}
} ) ;