[pve-devel] [PATCH manager 2/4] add the haStatus panel
Dominik Csapak
d.csapak at proxmox.com
Tue Nov 22 12:07:29 CET 2016
for the new status
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/ha/Status.js | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 www/manager6/ha/Status.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index d35ac35..857e5b5 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -182,6 +182,7 @@ JSSRC= \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
ha/StatusView.js \
+ ha/Status.js \
ha/GroupSelector.js \
ha/ResourceEdit.js \
ha/Resources.js \
diff --git a/www/manager6/ha/Status.js b/www/manager6/ha/Status.js
new file mode 100644
index 0000000..f841888
--- /dev/null
+++ b/www/manager6/ha/Status.js
@@ -0,0 +1,39 @@
+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('PVE.data.ObjectStore', {
+ interval: me.interval,
+ model: 'pve-ha-status',
+ storeid: 'pve-store-' + (++Ext.idSeed),
+ groupField: 'type',
+ proxy: {
+ type: 'pve',
+ 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);
+ }
+});
--
2.1.4
More information about the pve-devel
mailing list