[pve-devel] [PATCH widget-toolkit] node: repos: only show suites warning at the top if enabled repository is affected

Fabian Ebner f.ebner at proxmox.com
Fri Jul 9 10:08:22 CEST 2021


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 at proxmox.com>
---
 src/node/APTRepositories.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
index 4a37adb..c7222fc 100644
--- a/src/node/APTRepositories.js
+++ b/src/node/APTRepositories.js
@@ -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);
 		    }
-- 
2.30.2






More information about the pve-devel mailing list