pve-manager/www/manager6/dc/Summary.js
Dominik Csapak cf8b372acc change layout of dc summary and nodeview
this patch changes a few things:
 * instead of having the nodeview in full size, it is just a panel in
   the summary, similar to node/qemu/lxc summary
 * creates the store in the summary component, and not in the nodeview,
   because we need it later
 * makes most of the config options of the nodeview declarative, gets
   rid of the initcomponent
 * changes the 'online' yes/no to a check/x
 * makes the panel resizable with tools

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-29 08:43:06 +02:00

60 lines
991 B
JavaScript

Ext.define('PVE.dc.Summary', {
extend: 'Ext.panel.Panel',
alias: 'widget.pveDcSummary',
scrollable: true,
bodyPadding: '10 0 0 0',
layout: 'column',
defaults: {
width: 762,
padding: '0 0 10 10'
},
items: [
{
itemId: 'nodeview',
xtype: 'pveDcNodeView',
height: 250
}
],
initComponent: function() {
var me = this;
var rstore = Ext.create('PVE.data.UpdateStore', {
interval: 3000,
storeid: 'pve-cluster-status',
model: 'pve-dc-nodes',
proxy: {
type: 'pve',
url: "/api2/json/cluster/status"
}
});
var gridstore = Ext.create('PVE.data.DiffStore', {
rstore: rstore,
filters: {
property: 'type',
value: 'node'
},
sorters: {
property: 'id',
direction: 'ASC'
}
});
me.callParent();
me.getComponent('nodeview').setStore(gridstore);
me.on('destroy', function(){
rstore.stopUpdate();
});
rstore.startUpdate();
}
});