]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: fix dashboard subscription
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 2 Nov 2020 07:08:25 +0000 (08:08 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 2 Nov 2020 07:08:44 +0000 (08:08 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/Dashboard.js

index 122aa559859117d0b3e40d2155ad25ca3c1efa75..553c2b583d7b5dd3f69113fe29a34d568f47c0aa 100644 (file)
@@ -63,7 +63,9 @@ Ext.define('PBS.Dashboard', {
        updateSubscription: function(store, records, success) {
            if (!success) { return; }
            let me = this;
-           let subStatus = records[0].data.status === 'Active' ? 2 : 0; // 2 = all good, 1 = different leves, 0 = none
+           let status = records[0].data.status || 'unknown';
+           // 2 = all good, 1 = different leves, 0 = none
+           let subStatus = status.toLowerCase() === 'active' ? 2 : 0;
            me.lookup('subscription').setSubStatus(subStatus);
        },