pve-manager/www/manager6/ha/Status.js
Thomas Lamprecht 56a353b9e7 use RestProxy from widget toolkit
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00

40 lines
824 B
JavaScript

Ext.define('PVE.ha.Status', {
extend: 'Ext.panel.Panel',
alias: 'widget.pveHAStatus',
onlineHelp: 'chapter_ha_manager',
scrollable: true,
initComponent: function() {
var me = this;
me.rstore = Ext.create('Proxmox.data.ObjectStore', {
interval: me.interval,
model: 'pve-ha-status',
storeid: 'pve-store-' + (++Ext.idSeed),
groupField: 'type',
proxy: {
type: 'proxmox',
url: '/api2/json/cluster/ha/status/current'
}
});
me.items = [{
xtype: 'pveHAStatusView',
title: gettext('Status'),
rstore: me.rstore,
border: 0,
padding: '0 0 20 0'
},{
xtype: 'pveHAResourcesView',
title: gettext('Resources'),
border: 0,
rstore: me.rstore
}];
me.callParent();
me.on('activate', me.rstore.startUpdate);
}
});