[pve-devel] [PATCH manager] pending changes: switch to orange and anotate with '(pending)'

Emmanuel Kasper e.kasper at proxmox.com
Thu Aug 31 11:50:30 CEST 2017


On 08/31/2017 10:52 AM, Thomas Lamprecht wrote:
> red is normally strongly associated with errors, put pending changes
> are not errors.
> Tus use proxmox orange, to not scare (new) users and annotate the
> pending entry with '(pending)' to make it easier to see what
> happens.
> ---
>  www/manager6/grid/PendingObjectGrid.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/www/manager6/grid/PendingObjectGrid.js b/www/manager6/grid/PendingObjectGrid.js
> index d5702f2e..aa3aa488 100644
> --- a/www/manager6/grid/PendingObjectGrid.js
> +++ b/www/manager6/grid/PendingObjectGrid.js
> @@ -64,7 +64,7 @@ Ext.define('PVE.grid.PendingObjectGrid', {
>  	}
>  
>  	if (pending || pendingdelete) {
> -	    return current + '<div style="color:red">' + (pending || '') + pendingdelete + '</div>';
> +	    return current + '<div style="color:#e57000">' + (pending || '') + pendingdelete + ' (pending)</div>';
>  	} else {
>  	    return current;
>  	}
> 
Good idea: we use red for validations errors and unresponsive nodes so
this makes sense not to reuse it for annoting pending changes.

Two nitpicks: could we maybe use color: darkorange as it looks like the
styling you want to use, and we avoid hardsetting an hex value.

Also we have a gettext string available for pending, that we use in the
Replication panel.

If we add a gettext, it will be a long string concatenation so maybe the
use of Ext.String.format() is a bit more readable

return Ext.String.format('{0}<div style="color:#e57000">{1} {2}
({3})</div>', current, pending || '', pendingdelete, gettext('pending'));




More information about the pve-devel mailing list