all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Alexandre Derumier <aderumier@odiso.com>
Subject: Re: [pve-devel] [PATCH v7 pve-manager 12/15] sdn: display pending values
Date: Wed, 25 Nov 2020 17:17:48 +0100	[thread overview]
Message-ID: <7c28f8ba-738a-4809-ab9b-4c11a9f565ef@proxmox.com> (raw)
In-Reply-To: <20201124135221.2856467-13-aderumier@odiso.com>

On 24.11.20 14:52, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> ---
>  www/manager6/Utils.js              | 29 ++++++++++++++++++
>  www/manager6/sdn/ControllerView.js | 39 +++++++++++++++++++++---
>  www/manager6/sdn/SubnetView.js     | 49 +++++++++++++++++++++++++++---
>  www/manager6/sdn/VnetView.js       | 31 +++++++++++++++++--
>  www/manager6/sdn/ZoneView.js       | 47 +++++++++++++++++++++++++---
>  5 files changed, 181 insertions(+), 14 deletions(-)
> 
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index 5440b972..257af3fd 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -175,6 +175,35 @@ Ext.define('PVE.Utils', { utilities: {
>  	'HEALTH_ERR':'critical'
>      },
>  
> +    render_sdn_pending: function(rec,value,key, index) {
> +        if (rec.data.state === 'deleted') {
> +            if (value === undefined) {
> +                return '';
> +            } else {
> +                return '<div style="text-decoration: line-through;">'+ value +'</div>';
> +            }
> +
> +        } else if (rec.data.state === 'new') {
> +            if(index === undefined) {
> +                value = rec.data.pending[key];
> +            }
> +            if (value === undefined || value === null) {
> +                value = '';
> +            }
> +            return '<div style="color:green">' + value + '</div>';
> +        } else if (rec.data.state === 'changed') {
> +            if (value === undefined || value === null) {
> +                value = '<br>';
> +            }
> +            if (rec.data.pending[key] === undefined || rec.data.pending[key] === null) {
> +                rec.data.pending[key] = value;
> +            }
> +           return '<div style="text-decoration: line-through;">'+ value +'</div>' + '<div style="color:orange">' + rec.data.pending[key] + '</div>';
> +        } else {
> +            return value;
> +        }
> +    },
> +
>      render_ceph_health: function(healthObj) {
>  	var state = {
>  	    iconCls: PVE.Utils.get_health_icon(),


This feels really subtle as one initially has no idea why all is green, for
example. Visually and contrast wise it looks also a bit weird, IMO.

The strike-through for pending changes looks OK, I'd avoid the red though.

Further, I'd avoid to use style on the whole row to mark something as
pending-new or pending-change.

How about using a dedicated Pending column, which shows the state in text
form. You could checkout the render_backup_encryption helper[0] for how one
can produce a combination of text, icons and even tooltips.
(albeit the icon choice would be a bit hard here, so just text is fine too
IMO).

[0]: https://git.proxmox.com/?p=pve-manager.git;a=blob;f=www/manager6/Utils.js;h=6e6498a21919ca4dd2cb65ab02a1a1730d4c2d36;hb=HEAD#l224





  reply	other threads:[~2020-11-25 16:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 13:52 [pve-devel] [PATCH v7 pve-manager 00/15] sdn: add subnets management Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 01/15] sdn: vnetedit: add subnets && remove ip/mac Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 02/15] add sdn subnets Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 03/15] add sdn ipams Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 04/15] sdn: add PVEIpam Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 05/15] sdn: subnets: ipam is optional Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 06/15] add sdn dns Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 07/15] subnets: add dns fields Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 08/15] add vnet option to subnets and remove subnets list from vnet Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 09/15] add vnet panel with vnet + subnets split view Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 10/15] subnets: move ipam/dns in advanced section, and use "pve" as default ipam Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 11/15] sdn: add options panel + move controller/ipam/dns view Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 12/15] sdn: display pending values Alexandre Derumier
2020-11-25 16:17   ` Thomas Lamprecht [this message]
2020-11-30 18:15     ` alexandre derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 13/15] move ipams && dns options to zone Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 14/15] sdn: browser: add onlinehelp Alexandre Derumier
2020-11-24 13:52 ` [pve-devel] [PATCH v7 pve-manager 15/15] sdn: evpn improvments Alexandre Derumier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c28f8ba-738a-4809-ab9b-4c11a9f565ef@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal