Restricted federation stats to active organizations only.

This commit is contained in:
Christian P. MOMON 2022-01-22 19:28:52 +01:00
parent 8a106f01c7
commit 87b44605c5
2 changed files with 11 additions and 11 deletions

View file

@ -64,19 +64,19 @@ public class FederationStatsPage
data.setContent("federationHeaderView", FederationHeaderView.htmlize(federation)); data.setContent("federationHeaderView", FederationHeaderView.htmlize(federation));
data.setContent("turnoutChart", ChartHtmlizer.htmlizeOrganizationTurnoutChart(federation.getOrganizations())); data.setContent("turnoutChart", ChartHtmlizer.htmlizeOrganizationTurnoutChart(federation.getActiveOrganizations()));
data.setContent("organizationCountryChart", ChartHtmlizer.htmlizeOrganizationCountryChart(federation.getOrganizations())); data.setContent("organizationCountryChart", ChartHtmlizer.htmlizeOrganizationCountryChart(federation.getActiveOrganizations()));
data.setContent("organizationCountChart", ChartHtmlizer.htmlizeOrganizationCountChart(federation)); data.setContent("organizationCountChart", ChartHtmlizer.htmlizeOrganizationCountChart(federation));
data.setContent("organizationInOutChart", ChartHtmlizer.htmlizeOrganizationInOutChart(federation)); data.setContent("organizationInOutChart", ChartHtmlizer.htmlizeOrganizationInOutChart(federation));
data.setContent("hostServerTypeChart", ChartHtmlizer.htmlizeHostServerTypeChart(federation.getServicesAll())); data.setContent("hostServerTypeChart", ChartHtmlizer.htmlizeHostServerTypeChart(federation.getServices()));
data.setContent("hostProviderTypeChart", ChartHtmlizer.htmlizeHostProviderTypeChart(federation.getServicesAll())); data.setContent("hostProviderTypeChart", ChartHtmlizer.htmlizeHostProviderTypeChart(federation.getServices()));
data.setContent("serviceInstallTypeChart", ChartHtmlizer.htmlizeServiceInstallTypeChart(federation.getServicesAll())); data.setContent("serviceInstallTypeChart", ChartHtmlizer.htmlizeServiceInstallTypeChart(federation.getServices()));
data.setContent("serviceCountryChart", ChartHtmlizer.htmlizeServiceCountryChart(federation.getServicesAll())); data.setContent("serviceCountryChart", ChartHtmlizer.htmlizeServiceCountryChart(federation.getServices()));
// //
{ {
RegistrationStats stats = StatAgent.statRegistrationTypes(federation.getServicesAll()); RegistrationStats stats = StatAgent.statRegistrationTypes(federation.getServices());
data.setContent("registrationTypeChart", ChartHtmlizer.htmlizeRegistrationBarChart(stats)); data.setContent("registrationTypeChart", ChartHtmlizer.htmlizeRegistrationBarChart(stats));
data.setContent("registrationNoneTypeChart", ChartHtmlizer.htmlizeRegistrationNonePieChart(stats)); data.setContent("registrationNoneTypeChart", ChartHtmlizer.htmlizeRegistrationNonePieChart(stats));
@ -86,14 +86,14 @@ public class FederationStatsPage
} }
data.setContent("serviceCountYearChart", ChartHtmlizer.htmlizeServiceCountYearChart(federation)); data.setContent("serviceCountYearChart", ChartHtmlizer.htmlizeServiceCountYearChart(federation));
data.setContent("serviceDateStatusChart", ChartHtmlizer.htmlizeServiceDateStatusChart(federation.getServicesAll())); data.setContent("serviceDateStatusChart", ChartHtmlizer.htmlizeServiceDateStatusChart(federation.getServices()));
data.setContent("softwareDistributionChart", ChartHtmlizer.htmlizeSoftwareDistributionChart()); data.setContent("softwareDistributionChart", ChartHtmlizer.htmlizeSoftwareDistributionChart());
data.setContent("softwareDistributionPieChart", ChartHtmlizer.htmlizeSoftwareDistributionPieChart(federation.getServicesAll())); data.setContent("softwareDistributionPieChart", ChartHtmlizer.htmlizeSoftwareDistributionPieChart(federation.getServicesAll()));
data.setContent("categoryDistributionChart", ChartHtmlizer.htmlizeCategoryDistributionChart()); data.setContent("categoryDistributionChart", ChartHtmlizer.htmlizeCategoryDistributionChart());
data.setContent("categoryDistributionPieChart", ChartHtmlizer.htmlizeCatergoryDistributionPieChart(federation.getServicesAll())); data.setContent("categoryDistributionPieChart", ChartHtmlizer.htmlizeCatergoryDistributionPieChart(federation.getServicesAll()));
data.setContent("hostNameChart", ChartHtmlizer.htmlizeHostNamePieChart(federation.getServicesAll())); data.setContent("hostNameChart", ChartHtmlizer.htmlizeHostNamePieChart(federation.getServices()));
// //
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/federationStats.xhtml", data).toString(); String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/federationStats.xhtml", data).toString();

View file

@ -87,7 +87,7 @@ public class StatAgent
CategoryStat stat = new CategoryStat(category); CategoryStat stat = new CategoryStat(category);
StringSet organizations = new StringSet(); StringSet organizations = new StringSet();
for (Service service : federation.getServicesAll()) for (Service service : federation.getServices())
{ {
String softwareName = service.getSoftwareName(); String softwareName = service.getSoftwareName();
if (category.getSoftwares().containsIgnoreCase(softwareName)) if (category.getSoftwares().containsIgnoreCase(softwareName))
@ -195,7 +195,7 @@ public class StatAgent
SoftwareStat stat = new SoftwareStat(software.getName()); SoftwareStat stat = new SoftwareStat(software.getName());
stat.getCategories().addAll(categories.findBySoftware(software.getName())); stat.getCategories().addAll(categories.findBySoftware(software.getName()));
StringSet organizations = new StringSet(); StringSet organizations = new StringSet();
for (Service service : federation.getServicesAll()) for (Service service : federation.getServices())
{ {
Software current = catalog.get(service.getSoftwareName()); Software current = catalog.get(service.getSoftwareName());
if (current == software) if (current == software)