ui: render storage type: improve fallback

We support external storage plugins, e.g., for proprietary
technology, so a "unknown" value here may not actually mean that we
missed anything, so just return the type value 1:1 as fallback, that
gives the user a better idea about such a storage entry.

Reported-by: Joshua Huber <jhuber@blockbridge.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-04-01 17:28:36 +02:00
parent 349fe2a92a
commit d0477f12ad

View File

@ -997,11 +997,8 @@ Ext.define('PVE.Utils', {
value = !record || record.get('monhost') ? 'cephfs' : 'pvecephfs';
}
var schema = PVE.Utils.storageSchema[value];
if (schema) {
return schema.name;
}
return Proxmox.Utils.unknownText;
let schema = PVE.Utils.storageSchema[value];
return schema?.name ?? value;
},
format_ha: function(value) {