node: repos: fallback to "Other" for unknown origin

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-06-30 21:58:29 +02:00
parent 5a1fddb622
commit f0966f2930

View File

@ -329,6 +329,9 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
dataIndex: 'Origin',
width: 120,
renderer: (value, meta, rec) => {
if (typeof value !== 'string' || value.length === 0) {
value = gettext('Other');
}
let cls = 'fa fa-fw fa-question-circle-o';
if (value.match(/^\s*Proxmox\s*$/i)) {
cls = 'pmx-itype-icon pmx-itype-icon-proxmox-x';