all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] fix #5831: ui: right-align s.m.a.r.t numerical table data
@ 2024-11-11  9:40 Timothy Nicholson
  2024-11-11 13:19 ` Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy Nicholson @ 2024-11-11  9:40 UTC (permalink / raw)
  To: pve-devel

This patch right-aligns the numerical values of the table displaying
the S.M.A.R.T values in the Web UI.

Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
---

For better readability, numerical values in tables should be
right-aligned, not like previously (left-aligned).
https://bugzilla.proxmox.com/show_bug.cgi?id=5831

 src/window/DiskSmart.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/window/DiskSmart.js b/src/window/DiskSmart.js
index 9096fec..363ae28 100644
--- a/src/window/DiskSmart.js
+++ b/src/window/DiskSmart.js
@@ -29,6 +29,7 @@ Ext.define('Proxmox.window.DiskSmart', {
 		    text: 'ID',
 		    dataIndex: 'id',
 		    width: 50,
+		    align: 'right',
 		},
 		{
 		    text: gettext('Attribute'),
@@ -40,21 +41,25 @@ Ext.define('Proxmox.window.DiskSmart', {
 		    text: gettext('Value'),
 		    dataIndex: 'real-value',
 		    renderer: Ext.String.htmlEncode,
+		    align: 'right',
 		},
 		{
 		    text: gettext('Normalized'),
 		    dataIndex: 'real-normalized',
 		    width: 60,
+		    align: 'right',
 		},
 		{
 		    text: gettext('Threshold'),
 		    dataIndex: 'threshold',
 		    width: 60,
+		    align: 'right',
 		},
 		{
 		    text: gettext('Worst'),
 		    dataIndex: 'worst',
 		    width: 60,
+		    align: 'right',
 		},
 		{
 		    text: gettext('Flags'),
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit] fix #5831: ui: right-align s.m.a.r.t numerical table data
  2024-11-11  9:40 [pve-devel] [PATCH widget-toolkit] fix #5831: ui: right-align s.m.a.r.t numerical table data Timothy Nicholson
@ 2024-11-11 13:19 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2024-11-11 13:19 UTC (permalink / raw)
  To: Proxmox VE development discussion, Timothy Nicholson

one comment inline

On 11/11/24 10:40, Timothy Nicholson wrote:
> This patch right-aligns the numerical values of the table displaying
> the S.M.A.R.T values in the Web UI.
> 
> Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
> ---
> 
> For better readability, numerical values in tables should be
> right-aligned, not like previously (left-aligned).
> https://bugzilla.proxmox.com/show_bug.cgi?id=5831
> 
>   src/window/DiskSmart.js | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/src/window/DiskSmart.js b/src/window/DiskSmart.js
> index 9096fec..363ae28 100644
> --- a/src/window/DiskSmart.js
> +++ b/src/window/DiskSmart.js
> @@ -29,6 +29,7 @@ Ext.define('Proxmox.window.DiskSmart', {
>   		    text: 'ID',
>   		    dataIndex: 'id',
>   		    width: 50,
> +		    align: 'right',
>   		},
>   		{
>   		    text: gettext('Attribute'),
> @@ -40,21 +41,25 @@ Ext.define('Proxmox.window.DiskSmart', {
>   		    text: gettext('Value'),
>   		    dataIndex: 'real-value',
>   		    renderer: Ext.String.htmlEncode,
> +		    align: 'right',)

this (real-value) is the raw value from smartctl, and this is not a "numerical" value,
but more or less a freeform field. (e.g. i have some here with: '35 (Min/Max 17/35)')

So I'd argue that this should not be right aligned

looking at smartctl output, only ID is right aligned
and normalized/threshold/worst are 0 padded
(so those are fine to right align)

>   		},
>   		{
>   		    text: gettext('Normalized'),
>   		    dataIndex: 'real-normalized',
>   		    width: 60,
> +		    align: 'right',
>   		},
>   		{
>   		    text: gettext('Threshold'),
>   		    dataIndex: 'threshold',
>   		    width: 60,
> +		    align: 'right',
>   		},
>   		{
>   		    text: gettext('Worst'),
>   		    dataIndex: 'worst',
>   		    width: 60,
> +		    align: 'right',
>   		},
>   		{
>   		    text: gettext('Flags'),



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-11 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-11  9:40 [pve-devel] [PATCH widget-toolkit] fix #5831: ui: right-align s.m.a.r.t numerical table data Timothy Nicholson
2024-11-11 13:19 ` Dominik Csapak

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