]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
node: repos: only show suites warning at the top if enabled repository is affected
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 9 Jul 2021 08:08:22 +0000 (10:08 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Jul 2021 12:42:55 +0000 (14:42 +0200)
The warning still shows up for the disabled repository itself, but
having a disabled repository with a bad suite is not problematic for
the configuration status as a whole.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/node/APTRepositories.js

index 4a37adb3e74cc1371ad61fa1e697e833e4eae2e1..c7222fce750d1eb993c7a8ee4aeb6f2f1d076e24 100644 (file)
@@ -665,9 +665,6 @@ Ext.define('Proxmox.node.APTRepositories', {
                        (info.kind === 'ignore-pre-upgrade-warning' && !repoGrid.majorUpgradeAllowed)
                    ) {
                        infos[path][idx].warnings.push(info);
-                       if (!suitesWarning && info.property === 'Suites') {
-                           suitesWarning = true;
-                       }
                    } else {
                        throw 'unknown info';
                    }
@@ -682,6 +679,10 @@ Ext.define('Proxmox.node.APTRepositories', {
                        if (infos[file.path] && infos[file.path][n]) {
                            repo.Origin = infos[file.path][n].origin || Proxmox.Utils.UnknownText;
                            repo.warnings = infos[file.path][n].warnings || [];
+
+                           if (repo.Enabled && repo.warnings.some(w => w.property === 'Suites')) {
+                               suitesWarning = true;
+                           }
                        }
                        gridData.push(repo);
                    }