diff --git a/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java b/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java index b75175f..63f56c0 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java @@ -29,7 +29,10 @@ import org.slf4j.LoggerFactory; import fr.devinsy.catgenerator.core.CatGenerator; import fr.devinsy.statoolinfos.HtmlizerContext; +import fr.devinsy.statoolinfos.checker.PropertyChecker; +import fr.devinsy.statoolinfos.checker.PropertyChecks; import fr.devinsy.statoolinfos.core.Organization; +import fr.devinsy.statoolinfos.core.Service; import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.statoolinfos.crawl.CrawlCache; import fr.devinsy.xidyn.XidynException; @@ -130,6 +133,27 @@ public class OrganizationPage data.setAttribute("organizationMemberEndDateData", "style", "display: none;"); } + { + try + { + PropertyChecker checker = new PropertyChecker(); + PropertyChecks checks = checker.checkOrganization(organization.getInputFile()); + for (Service service : organization.getServices()) + { + PropertyChecks subChecks = checker.checkService(service.getInputFile()); + checks.addAll(subChecks); + } + + data.setContent("errorCount", checks.getErrorCount()); + data.setContent("warningCount", checks.getWarningCount()); + data.setContent("voidCount", checks.getVoidCount()); + } + catch (IOException exception) + { + exception.printStackTrace(); + } + } + data.setContent("serviceCount", organization.getServices().size()); data.setAttribute("rawLink", "href", organization.getTechnicalName() + ".properties"); diff --git a/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java b/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java index d1a86e5..11088bd 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java @@ -114,7 +114,6 @@ public class PropertyFileCheckPage page = PropertyFilesCheckPage.htmlize("Services", serviceAlertChecks); FileUtils.write(new File(htmlizeDirectory, "alertChecks-services.xhtml"), page, StandardCharsets.UTF_8); - } /** diff --git a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml index 31f6cfb..ed0a7c6 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml @@ -34,6 +34,11 @@ +