[pve-devel] [PATCH manager] ui: GuestStatusView: simplify HA state display

Dominik Csapak d.csapak at proxmox.com
Fri Oct 13 14:34:53 CEST 2017


Acked-By: Dominik Csapak <d.csapak at proxmox.com>
On 10/11/2017 02:10 PM, Thomas Lamprecht wrote:
> simplify HA Information in VM/CT Summary panel.
> Use the already translated  'HA State' instead of 'Managed by HA'
> (which now becomes obsolete as it was the single appearance).
> Simplify PVE.Utils.format_ha respectively to mach the new name,
> as here is the only use of this function we have no side effects.
> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>   www/manager6/Utils.js                 | 5 ++---
>   www/manager6/panel/GuestStatusView.js | 2 +-
>   2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index 5a79ffb4..eaecc6f6 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -852,11 +852,10 @@ Ext.define('PVE.Utils', { utilities: {
>       },
>   
>       format_ha: function(value) {
> -	var text = PVE.Utils.format_boolean(value.managed);
> +	var text = PVE.Utils.noneText;
>   
>   	if (value.managed) {
> -	    text += ', ' + PVE.Utils.stateText + ': ';
> -	    text += value.state || PVE.Utils.noneText;
> +	    text = value.state || PVE.Utils.noneText;
>   
>   	    text += ', ' +  PVE.Utils.groupText + ': ';
>   	    text += value.group || PVE.Utils.noneText;
> diff --git a/www/manager6/panel/GuestStatusView.js b/www/manager6/panel/GuestStatusView.js
> index 59240597..26415437 100644
> --- a/www/manager6/panel/GuestStatusView.js
> +++ b/www/manager6/panel/GuestStatusView.js
> @@ -24,7 +24,7 @@ Ext.define('PVE.panel.GuestStatusView', {
>   	},
>   	{
>   	    itemId: 'hamanaged',
> -	    title: gettext('Managed by HA'),
> +	    title: gettext('HA State'),
>   	    printBar: false,
>   	    textField: 'ha',
>   	    renderer: PVE.Utils.format_ha
> 





More information about the pve-devel mailing list