]>
Commit | Line | Data |
---|---|---|
c06fc226 DC |
1 | Ext.define('PVE.ha.Status', { |
2 | extend: 'Ext.panel.Panel', | |
3 | alias: 'widget.pveHAStatus', | |
4 | ||
5 | onlineHelp: 'chapter_ha_manager', | |
f464823a DC |
6 | layout: { |
7 | type: 'vbox', | |
f6710aac | 8 | align: 'stretch', |
f464823a | 9 | }, |
c06fc226 DC |
10 | |
11 | initComponent: function() { | |
12 | var me = this; | |
13 | ||
9cb193cf | 14 | me.rstore = Ext.create('Proxmox.data.ObjectStore', { |
c06fc226 DC |
15 | interval: me.interval, |
16 | model: 'pve-ha-status', | |
53e3ea84 | 17 | storeid: 'pve-store-' + ++Ext.idSeed, |
c06fc226 DC |
18 | groupField: 'type', |
19 | proxy: { | |
56a353b9 | 20 | type: 'proxmox', |
f6710aac TL |
21 | url: '/api2/json/cluster/ha/status/current', |
22 | }, | |
c06fc226 DC |
23 | }); |
24 | ||
25 | me.items = [{ | |
26 | xtype: 'pveHAStatusView', | |
27 | title: gettext('Status'), | |
28 | rstore: me.rstore, | |
29 | border: 0, | |
f464823a | 30 | collapsible: true, |
f6710aac TL |
31 | padding: '0 0 20 0', |
32 | }, { | |
c06fc226 | 33 | xtype: 'pveHAResourcesView', |
f464823a DC |
34 | flex: 1, |
35 | collapsible: true, | |
c06fc226 DC |
36 | title: gettext('Resources'), |
37 | border: 0, | |
f6710aac | 38 | rstore: me.rstore, |
c06fc226 DC |
39 | }]; |
40 | ||
41 | me.callParent(); | |
42 | me.on('activate', me.rstore.startUpdate); | |
f6710aac | 43 | }, |
c06fc226 | 44 | }); |