[pve-devel] [PATCH manager] StatusView: more verbose HA status output
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Apr 18 14:52:04 CEST 2016
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
www/manager6/Utils.js | 14 ++++++++++++++
www/manager6/lxc/StatusView.js | 2 +-
www/manager6/qemu/StatusView.js | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index cd61c24..d4acef3 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -778,6 +778,20 @@ Ext.define('PVE.Utils', { statics: {
return !value ? PVE.Utils.yesText : PVE.Utils.noText;
},
+ format_ha: function(value) {
+ var text = PVE.Utils.format_boolean(value.managed);
+
+ if (value.managed) {
+ text += ', State: ';
+ text += value.state ? value.state : PVE.Utils.noneText;
+
+ text += ', Group: ';
+ text += value.group ? value.group : PVE.Utils.noneText;
+ }
+
+ return text;
+ },
+
format_content_types: function(value) {
var cta = [];
diff --git a/www/manager6/lxc/StatusView.js b/www/manager6/lxc/StatusView.js
index d71420c..eaf9486 100644
--- a/www/manager6/lxc/StatusView.js
+++ b/www/manager6/lxc/StatusView.js
@@ -65,7 +65,7 @@ Ext.define('PVE.lxc.StatusView', {
swap: { header: gettext('VSwap usage'), required: true, renderer: render_swap },
maxswap: { visible: false },
uptime: { header: gettext('Uptime'), required: true, renderer: PVE.Utils.render_uptime },
- ha: { header: gettext('Managed by HA'), required: true, renderer: PVE.Utils.format_boolean }
+ ha: { header: gettext('Managed by HA'), required: true, renderer: PVE.Utils.format_ha }
};
Ext.applyIf(me, {
diff --git a/www/manager6/qemu/StatusView.js b/www/manager6/qemu/StatusView.js
index 5cac296..8a8d1ff 100644
--- a/www/manager6/qemu/StatusView.js
+++ b/www/manager6/qemu/StatusView.js
@@ -47,7 +47,7 @@ Ext.define('PVE.qemu.StatusView', {
mem: { header: gettext('Memory usage'), required: true, renderer: render_mem },
maxmem: { visible: false },
uptime: { header: gettext('Uptime'), required: true, renderer: PVE.Utils.render_uptime },
- ha: { header: gettext('Managed by HA'), required: true, renderer: PVE.Utils.format_boolean }
+ ha: { header: gettext('Managed by HA'), required: true, renderer: PVE.Utils.format_ha }
};
Ext.applyIf(me, {
--
2.1.4
More information about the pve-devel
mailing list