title: gettext('Health'),
bodyPadding: 10,
- height: 220,
+ height: 250,
layout: {
type: 'hbox',
- align: 'stretch'
+ align: 'stretch',
},
defaults: {
flex: 1,
xtype: 'box',
style: {
- 'text-align':'center'
- }
+ 'text-align': 'center',
+ },
},
nodeList: [],
var cluster = {
iconCls: PVE.Utils.get_health_icon('good', true),
- text: gettext("Standalone node - no cluster defined")
+ text: gettext("Standalone node - no cluster defined"),
};
var nodes = {
online: 0,
- offline: 0
+ offline: 0,
};
// by default we have one node
var item = records[i];
if (item.data.type === 'node') {
nodes[item.data.online === 1 ? 'online':'offline']++;
- } else if(item.data.type === 'cluster') {
+ } else if (item.data.type === 'cluster') {
cluster.text = gettext("Cluster") + ": ";
cluster.text += item.data.name + ", ";
cluster.text += gettext("Quorate") + ": ";
var me = this;
var cephstatus = me.getComponent('ceph');
if (!success || records.length < 1) {
-
// if ceph status is already visible
// don't stop to update
if (cephstatus.isVisible()) {
destroy: function() {
var me = this;
me.cephstore.stopUpdate();
- }
+ },
},
items: [
{
itemId: 'clusterstatus',
xtype: 'pveHealthWidget',
- title: gettext('Status')
+ title: gettext('Status'),
},
{
itemId: 'nodestatus',
data: {
online: 0,
- offline: 0
+ offline: 0,
},
tpl: [
'<h3>' + gettext('Nodes') + '</h3><br />',
gettext('Offline'),
'</div>',
'<div class="right-aligned">{offline}</div>',
- '</div>'
- ]
+ '</div>',
+ ],
},
{
itemId: 'ceph',
element: 'el',
click: function() {
var sp = Ext.state.Manager.getProvider();
- sp.set('dctab', {value:'ceph'}, true);
- }
- }
- }
+ sp.set('dctab', { value: 'ceph' }, true);
+ },
+ },
+ },
],
initComponent: function() {
storeid: 'pve-cluster-ceph',
proxy: {
type: 'proxmox',
- url: '/api2/json/nodes/' + me.nodeList[me.nodeIndex].node + '/ceph/status'
- }
+ url: '/api2/json/nodes/' + me.nodeList[me.nodeIndex].node + '/ceph/status',
+ },
});
me.callParent();
me.mon(me.cephstore, 'load', me.updateCeph, me);
me.cephstore.startUpdate();
- }
+ },
});