Am 29.11.24 um 11:41 schrieb Christian Ebner: > Until now, the reported smart value is returned unconditionally, even > if the drive might report an `UNKNOWN` status. > To allow for better handling of the unknown smart state, also return > the utils helper text in that case. This allows for better handling > of e.g. conditionally showing the smart values window. > > Signed-off-by: Christian Ebner <c.eb...@proxmox.com> > --- > src/panel/DiskList.js | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js > index dc10ac5..dfd8c8e 100644 > --- a/src/panel/DiskList.js > +++ b/src/panel/DiskList.js > @@ -7,7 +7,12 @@ Ext.define('pmx-disk-list', { > { > name: 'status', > convert: function(value, rec) { > - if (value) return value; > + if (value) { > + if (value.toLowerCase() === 'unknown') { > + return Proxmox.Utils.unknownText; > + }
hmm, using translated strings for internal state is not fully ideal IMO. Maybe just normalize it here to lowercase and place a renderer on where it matters? > + return value; > + } > if (rec.data.health) { > return rec.data.health; > } _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel