]> git.proxmox.com Git - pve-manager.git/commitdiff
followup: do not break on mixed, as one with no level could follow
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 May 2019 17:51:02 +0000 (17:51 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 May 2019 17:51:02 +0000 (17:51 +0000)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/dc/Summary.js

index 3317e3caccb7a3bbc91ecb762040eff678fb129e..1b3c72e03bf2fc05015092422b3bec2134c47755 100644 (file)
@@ -231,7 +231,7 @@ Ext.define('PVE.dc.Summary', {
        me.mon(rstore, 'load', function(store, records, success) {
            var i;
            var level;
-           var curlevel;
+           var mixed = false;
            for (i = 0; i < records.length; i++) {
                if (records[i].get('type') !== 'node') {
                    continue;
@@ -241,7 +241,7 @@ Ext.define('PVE.dc.Summary', {
                    continue;
                }
 
-               curlevel = node.get('level');
+               var curlevel = node.get('level');
 
                if (curlevel === '') { // no subscription trumps all, set and break
                    level = '';
@@ -250,10 +250,8 @@ Ext.define('PVE.dc.Summary', {
 
                if (level === undefined) { // save level
                    level = curlevel;
-                   continue;
-               }
-               if (level !== curlevel) { // detect different levels
-                   break;
+               } else if (level !== curlevel) { // detect different levels
+                   mixed = true;
                }
            }
 
@@ -269,7 +267,7 @@ Ext.define('PVE.dc.Summary', {
                    text: gettext('You have at least one node without subscription.')
                };
                subs.setUserCls('pointer');
-           } else if (level !== curlevel) {
+           } else if (mixed) {
                data = {
                    title: gettext('Mixed Subscriptions'),
                    iconCls: PVE.Utils.get_health_icon('warning', true),