diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java index af422a2..8ba29f4 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Christian Pierre MOMON + * Copyright (C) 2020-2021 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -29,6 +29,8 @@ import org.slf4j.LoggerFactory; import fr.devinsy.catgenerator.core.BirdGenerator; import fr.devinsy.statoolinfos.HtmlizerContext; +import fr.devinsy.statoolinfos.checker.PropertyChecker; +import fr.devinsy.statoolinfos.checker.PropertyChecks; import fr.devinsy.statoolinfos.core.Metric; import fr.devinsy.statoolinfos.core.Organization; import fr.devinsy.statoolinfos.core.Service; @@ -205,6 +207,23 @@ public class ServicePage data.getIdData("softwareSourceLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); } + { + try + { + PropertyChecker checker = new PropertyChecker(); + PropertyChecks checks = checker.checkService(service.getInputFile()); + data.setContent("errorCount", checks.getErrorCount()); + data.setContent("warningCount", checks.getWarningCount()); + data.setContent("voidCount", checks.getVoidCount()); + + data.setAttribute("alertLink", "href", organization.getTechnicalName() + "-" + service.getTechnicalName() + "-check.xhtml#alerts"); + } + catch (IOException exception) + { + exception.printStackTrace(); + } + } + // int graphicIndex = 0; // data.setContent("fooChart", graphicIndex++, diff --git a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml index 3da2113..b00678d 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml @@ -34,11 +34,11 @@ -
+
- n/a
- n/a
- n/a +
n/a
+
n/a
+
n/a
diff --git a/src/fr/devinsy/statoolinfos/htmlize/propertyFileCheck.xhtml b/src/fr/devinsy/statoolinfos/htmlize/propertyFileCheck.xhtml index 7722fbb..b8e46bd 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/propertyFileCheck.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/propertyFileCheck.xhtml @@ -87,6 +87,12 @@ document.getElementById ('alertBlock').style.display = 'block'; } } + + document.body.onload = function() + { + if (window.location.href.endsWith("#alerts")) + setView('ALERTS'); + } diff --git a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml index e2fa72f..701fb9e 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml @@ -41,6 +41,13 @@ +
+ +
n/a
+
n/a
+
n/a
+
+