Added organization stats with metrics.

This commit is contained in:
Christian P. MOMON 2021-05-27 04:02:34 +02:00
parent 0e3dbd7e05
commit ddf4132386
16 changed files with 843 additions and 184 deletions

View file

@ -166,7 +166,6 @@ public class Htmlizer
FederationPage.build(); FederationPage.build();
FederationStatsPage.build(); FederationStatsPage.build();
OrganizationPage.buildAll(); OrganizationPage.buildAll();
OrganizationStatsPage.buildAll();
PropertyFileCheckPage.buildAll(); PropertyFileCheckPage.buildAll();
PropertiesFilesPage.build(); PropertiesFilesPage.build();
PropertyStatsPage.buildAll(); PropertyStatsPage.buildAll();

View file

@ -0,0 +1,109 @@
/*
* Copyright (C) 2020-2021 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import java.io.File;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.HtmlizerContext;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.htmlize.OrganizationMetricMenuView.MenuItem;
import fr.devinsy.statoolinfos.stats.StatAgent;
import fr.devinsy.statoolinfos.stats.services.RegistrationStats;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
/**
* The Class OrganizationGeneralStatsPage.
*/
public class OrganizationGeneralStatsPage
{
private static Logger logger = LoggerFactory.getLogger(OrganizationGeneralStatsPage.class);
/**
* Htmlize.
*
* @param organization
* the organization
* @return the string
* @throws StatoolInfosException
* the statool infos exception
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static String htmlize(final Organization organization) throws StatoolInfosException, IOException
{
String result;
try
{
logger.debug("Building organization general page {}…");
File htmlizeDirectory = HtmlizerContext.instance().getHtmlizeDirectory();
TagDataManager data = new TagDataManager();
//
data.setContent("headerView", OrganizationHeaderView.htmlize(organization));
data.setContent("metricMenuView", OrganizationMetricMenuView.htmlize(organization, MenuItem.SUMMARY));
//
data.setContent("serviceCountYearChart", ChartHtmlizer.htmlizeServiceCountYearChart(organization));
data.setContent("serviceDateStatusChart", ChartHtmlizer.htmlizeServiceDateStatusChart(organization.getServices()));
data.setContent("turnoutChart", ChartHtmlizer.htmlizeOrganizationTurnoutChart(organization));
data.setContent("hostServerTypeChart", ChartHtmlizer.htmlizeHostServerTypeChart(organization.getServices()));
data.setContent("hostProviderTypeChart", ChartHtmlizer.htmlizeHostProviderTypeChart(organization.getServices()));
data.setContent("serviceInstallTypeChart", ChartHtmlizer.htmlizeServiceInstallTypeChart(organization.getServices()));
data.setContent("serviceCountryChart", ChartHtmlizer.htmlizeServiceCountryChart(organization.getServices()));
//
{
RegistrationStats stats = StatAgent.statRegistrationTypes(organization.getServices());
data.setContent("registrationTypeChart", ChartHtmlizer.htmlizeRegistrationBarChart(stats));
data.setContent("registrationNoneTypeChart", ChartHtmlizer.htmlizeRegistrationNonePieChart(stats));
data.setContent("registrationFreeTypeChart", ChartHtmlizer.htmlizeRegistrationFreePieChart(stats));
data.setContent("registrationMemberTypeChart", ChartHtmlizer.htmlizeRegistrationMemberPieChart(stats));
data.setContent("registrationClientTypeChart", ChartHtmlizer.htmlizeRegistrationClientPieChart(stats));
}
//
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationGeneralStatsView.xhtml", data).toString();
//
BreadcrumbTrail trail = new BreadcrumbTrail();
trail.add(organization.getName(), organization.getTechnicalName() + ".xhtml");
result = WebCharterView.build(content, trail);
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building organization general page: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -0,0 +1,80 @@
/*
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.htmlize.OrganizationMetricMenuView.MenuItem;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
/**
* The Class OrganizationGenericMetricPage.
*/
public class OrganizationGenericMetricPage
{
private static Logger logger = LoggerFactory.getLogger(OrganizationGenericMetricPage.class);
/**
* Builds the.
*
* @param organization
* the service
* @return the string
* @throws StatoolInfosException
* the statool infos exception
*/
public static String htmlize(final Organization organization) throws StatoolInfosException
{
String result;
try
{
logger.debug("Building oranization generic metric page {}…", organization.get("service.name"));
TagDataManager data = new TagDataManager();
//
data.setContent("headerView", OrganizationHeaderView.htmlize(organization));
data.setContent("metricMenuView", OrganizationMetricMenuView.htmlize(organization, MenuItem.GENERIC));
//
int graphicIndex = 0;
//
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationMetricView.xhtml", data).toString();
BreadcrumbTrail trail = new BreadcrumbTrail();
trail.add(organization.getName(), organization.getTechnicalName() + ".xhtml");
trail.add(organization.getName(), organization.getTechnicalName() + "-" + organization.getTechnicalName() + ".xhtml");
result = WebCharterView.build(content, trail);
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building organization generic metric page: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -0,0 +1,167 @@
/*
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.checker.PropertyChecks;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.DisplayMode;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
import fr.devinsy.xidyn.utils.XidynUtils;
/**
* The Class OrganizationHeaderView.
*/
public class OrganizationHeaderView
{
private static Logger logger = LoggerFactory.getLogger(OrganizationHeaderView.class);
/**
* Htmlize.
*
* @param organization
* the organization
* @return the string
* @throws StatoolInfosException
* the statool infos exception
*/
public static String htmlize(final Organization organization) throws StatoolInfosException
{
String result;
try
{
logger.debug("htmlizing service header page {}…", organization.get("service.name"));
TagDataManager data = new TagDataManager();
data.setAttribute("organizationRawButton", "href", organization.getTechnicalName() + ".properties");
data.setAttribute("organizationLogo", "src", organization.getLogoFileName());
data.setEscapedContent("organizationName", organization.get("organization.name"));
data.setEscapedContent("organizationURL", organization.getWebsite());
data.setEscapedAttribute("organizationURL", "href", organization.getWebsite());
data.setEscapedContent("organizationDescription", organization.get("organization.description"));
data.setEscapedContent("organizationMemberOfName", StringUtils.defaultIfBlank(organization.getFederation().getName(), "n/a"));
data.setContent("organizationStartDate", StringUtils.defaultIfBlank(organization.getStartDate(), "n/a"));
data.setContent("organizationEndDate", StringUtils.defaultIfBlank(organization.getEndDate(), "n/a"));
data.setContent("organizationAge", StringUtils.defaultIfBlank(organization.getAge(), "n/a"));
if (StringUtils.isBlank(organization.getEndDate()))
{
data.setContent("organizationMemberOfWord", "depuis");
data.setAttribute("organizationEndDateData", "style", "display: none;");
}
else
{
data.setContent("organizationMemberOfWord", ":");
}
data.setContent("organizationMemberStartDate", StringUtils.defaultIfBlank(organization.getMemberStartDate(), "n/a"));
data.setContent("organizationMemberEndDate", StringUtils.defaultIfBlank(organization.getMemberEndDate(), "n/a"));
data.setContent("organizationMemberAge", StringUtils.defaultIfBlank(organization.getMemberAge(), "n/a"));
if (StringUtils.isBlank(organization.getMemberEndDate()))
{
data.setAttribute("organizationMemberEndDateData", "style", "display: none;");
}
else
{
data.setContent("organizationStartDateWord", "");
}
data.setContent("serviceCount", organization.getServices().size());
data.setAttribute("rawLink", "href", organization.getTechnicalName() + ".properties");
data.setAttribute("rawCheckLink", "href", organization.getTechnicalName() + "-check.xhtml");
data.setAttribute("statsLink", "href", organization.getTechnicalName() + "-stats.xhtml");
data.setAttribute("crawlLink", "href", organization.getTechnicalName() + "-crawl.xhtml");
if (organization.getCrawlJournal().getErrors().isEmpty())
{
data.setAttribute("crawlLinkImg", "src", "circle-icons/download-mono.svg");
}
else
{
data.setAttribute("crawlLinkImg", "src", "circle-icons/download.svg");
}
{
PropertyChecks checks = organization.getInputChecksAll();
data.setContent("errorCount", checks.getErrorCount());
data.setContent("warningCount", checks.getWarningCount());
data.setContent("voidCount", checks.getVoidCount());
data.setAttribute("alertLink", "href", organization.getTechnicalName() + "-checkalerts.xhtml");
}
if (StringUtils.isNotBlank(organization.getLegalWebsite()))
{
data.setEscapedAttribute("legalLink", "href", organization.getLegalWebsite());
data.setAttribute("legalLinkImg", "class", "");
data.getIdData("legalLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getContactWebsite()))
{
data.setEscapedAttribute("contactLink", "href", organization.getContactWebsite());
data.setAttribute("contactLinkImg", "class", "");
data.getIdData("contactLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getContactEmail()))
{
data.setEscapedAttribute("emailLink", "href", "mailto:" + organization.getContactEmail());
data.setAttribute("emailLinkImg", "class", "");
data.getIdData("emailLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getUserGuideWebsite()))
{
data.setEscapedAttribute("userDocLink", "href", organization.getUserGuideWebsite());
data.setAttribute("userDocLinkImg", "class", "");
data.getIdData("userDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getTechnicalGuideWebsite()))
{
data.setEscapedAttribute("technicalDocLink", "href", organization.getTechnicalGuideWebsite());
data.setAttribute("technicalDocLinkImg", "class", "");
data.getIdData("technicalDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
//
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationHeaderView.xhtml", data).toString();
result = XidynUtils.extractBodyContent(content);
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building service header view: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -0,0 +1,103 @@
/*
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
import fr.devinsy.xidyn.utils.XidynUtils;
/**
* The Class OrganizationMetricMenuView.
*/
public class OrganizationMetricMenuView
{
private static Logger logger = LoggerFactory.getLogger(OrganizationMetricMenuView.class);
public enum MenuItem
{
SUMMARY,
GENERAL,
GENERIC,
WEB,
SPECIFIC
}
/**
* Htmlize.
*
* @param organization
* the service
* @return the string
* @throws StatoolInfosException
* the statool infos exception
*/
public static String htmlize(final Organization organization, final MenuItem item) throws StatoolInfosException
{
String result;
try
{
TagDataManager data = new TagDataManager();
data.setAttribute("summaryTypeButton", "href", organization.getTechnicalName() + "-stats.xhtml");
data.setAttribute("generalTypeButton", "href", organization.getTechnicalName() + "-stats-general.xhtml");
data.setAttribute("genericTypeButton", "href", organization.getTechnicalName() + "-stats-genericmetrics.xhtml");
data.setAttribute("webTypeButton", "href", organization.getTechnicalName() + "-stats-webmetrics.xhtml");
data.setAttribute("specificTypeButton", "href", organization.getTechnicalName() + "-stats-specificmetrics.xhtml");
if ((item == null) || (item == MenuItem.SUMMARY))
{
data.appendAttribute("summaryTypeButton", "class", "button selected");
}
else if (item == MenuItem.GENERAL)
{
data.appendAttribute("generalTypeButton", "class", "button selected");
}
else if (item == MenuItem.GENERIC)
{
data.appendAttribute("genericTypeButton", "class", "button selected");
}
else if (item == MenuItem.WEB)
{
data.appendAttribute("webTypeButton", "class", "button selected");
}
else if (item == MenuItem.SPECIFIC)
{
data.appendAttribute("specificTypeButton", "class", "button selected");
}
//
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/metricMenuView.xhtml", data).toString();
result = XidynUtils.extractBodyContent(content);
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building service metric menu view: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -23,18 +23,15 @@ import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fr.devinsy.catgenerator.core.CatGenerator; import fr.devinsy.catgenerator.core.CatGenerator;
import fr.devinsy.statoolinfos.HtmlizerContext; import fr.devinsy.statoolinfos.HtmlizerContext;
import fr.devinsy.statoolinfos.checker.PropertyChecks;
import fr.devinsy.statoolinfos.core.Organization; import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.crawl.CrawlCache; import fr.devinsy.statoolinfos.crawl.CrawlCache;
import fr.devinsy.xidyn.XidynException; import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.DisplayMode;
import fr.devinsy.xidyn.data.TagDataManager; import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils; import fr.devinsy.xidyn.presenters.PresenterUtils;
@ -74,6 +71,27 @@ public class OrganizationPage
// //
page = PropertyFilesCheckPage.htmlize(organization.getName(), organization.getInputChecksAll().getAlertLines()); page = PropertyFilesCheckPage.htmlize(organization.getName(), organization.getInputChecksAll().getAlertLines());
FileUtils.write(new File(htmlizeDirectory, organization.getTechnicalName() + "-checkalerts.xhtml"), page, StandardCharsets.UTF_8); FileUtils.write(new File(htmlizeDirectory, organization.getTechnicalName() + "-checkalerts.xhtml"), page, StandardCharsets.UTF_8);
//
logger.info("Htmlize organization general metric page: {}.", organization.getName());
page = OrganizationStatsPage.htmlize(organization);
FileUtils.write(new File(htmlizeDirectory, organization.getLocalFileBaseName() + "-stats.xhtml"), page, StandardCharsets.UTF_8);
logger.info("Htmlize organization general metric page: {}.", organization.getName());
page = OrganizationGeneralStatsPage.htmlize(organization);
FileUtils.write(new File(htmlizeDirectory, organization.getLocalFileBaseName() + "-stats-general.xhtml"), page, StandardCharsets.UTF_8);
logger.info("Htmlize organization generic metric page: {}.", organization.getName());
page = OrganizationGenericMetricPage.htmlize(organization);
FileUtils.write(new File(htmlizeDirectory, organization.getLocalFileBaseName() + "-stats-genericmetrics.xhtml"), page, StandardCharsets.UTF_8);
logger.info("Htmlize organization web metric page: {}.", organization.getName());
page = OrganizationWebMetricPage.htmlize(organization);
FileUtils.write(new File(htmlizeDirectory, organization.getLocalFileBaseName() + "-stats-webmetrics.xhtml"), page, StandardCharsets.UTF_8);
logger.info("Htmlize service specific metric page: {}.", organization.getName());
page = OrganizationSpecificMetricPage.htmlize(organization);
FileUtils.write(new File(htmlizeDirectory, organization.getLocalFileBaseName() + "-stats-specificmetrics.xhtml"), page, StandardCharsets.UTF_8);
} }
/** /**
@ -109,100 +127,8 @@ public class OrganizationPage
TagDataManager data = new TagDataManager(); TagDataManager data = new TagDataManager();
data.setAttribute("organizationRawButton", "href", organization.getTechnicalName() + ".properties"); //
data.setContent("organizationHeaderView", OrganizationHeaderView.htmlize(organization));
data.setAttribute("organizationLogo", "src", organization.getLogoFileName());
data.setEscapedContent("organizationName", organization.get("organization.name"));
data.setEscapedContent("organizationURL", organization.getWebsite());
data.setEscapedAttribute("organizationURL", "href", organization.getWebsite());
data.setEscapedContent("organizationDescription", organization.get("organization.description"));
data.setEscapedContent("organizationMemberOfName", StringUtils.defaultIfBlank(organization.getFederation().getName(), "n/a"));
data.setContent("organizationStartDate", StringUtils.defaultIfBlank(organization.getStartDate(), "n/a"));
data.setContent("organizationEndDate", StringUtils.defaultIfBlank(organization.getEndDate(), "n/a"));
data.setContent("organizationAge", StringUtils.defaultIfBlank(organization.getAge(), "n/a"));
if (StringUtils.isBlank(organization.getEndDate()))
{
data.setContent("organizationMemberOfWord", "depuis");
data.setAttribute("organizationEndDateData", "style", "display: none;");
}
else
{
data.setContent("organizationMemberOfWord", ":");
}
data.setContent("organizationMemberStartDate", StringUtils.defaultIfBlank(organization.getMemberStartDate(), "n/a"));
data.setContent("organizationMemberEndDate", StringUtils.defaultIfBlank(organization.getMemberEndDate(), "n/a"));
data.setContent("organizationMemberAge", StringUtils.defaultIfBlank(organization.getMemberAge(), "n/a"));
if (StringUtils.isBlank(organization.getMemberEndDate()))
{
data.setAttribute("organizationMemberEndDateData", "style", "display: none;");
}
else
{
data.setContent("organizationStartDateWord", "");
}
data.setContent("serviceCount", organization.getServices().size());
data.setAttribute("rawLink", "href", organization.getTechnicalName() + ".properties");
data.setAttribute("rawCheckLink", "href", organization.getTechnicalName() + "-check.xhtml");
data.setAttribute("statsLink", "href", organization.getTechnicalName() + "-stats.xhtml");
data.setAttribute("crawlLink", "href", organization.getTechnicalName() + "-crawl.xhtml");
if (organization.getCrawlJournal().getErrors().isEmpty())
{
data.setAttribute("crawlLinkImg", "src", "circle-icons/download-mono.svg");
}
else
{
data.setAttribute("crawlLinkImg", "src", "circle-icons/download.svg");
}
{
PropertyChecks checks = organization.getInputChecksAll();
data.setContent("errorCount", checks.getErrorCount());
data.setContent("warningCount", checks.getWarningCount());
data.setContent("voidCount", checks.getVoidCount());
data.setAttribute("alertLink", "href", organization.getTechnicalName() + "-checkalerts.xhtml");
}
if (StringUtils.isNotBlank(organization.getLegalWebsite()))
{
data.setEscapedAttribute("legalLink", "href", organization.getLegalWebsite());
data.setAttribute("legalLinkImg", "class", "");
data.getIdData("legalLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getContactWebsite()))
{
data.setEscapedAttribute("contactLink", "href", organization.getContactWebsite());
data.setAttribute("contactLinkImg", "class", "");
data.getIdData("contactLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getContactEmail()))
{
data.setEscapedAttribute("emailLink", "href", "mailto:" + organization.getContactEmail());
data.setAttribute("emailLinkImg", "class", "");
data.getIdData("emailLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getUserGuideWebsite()))
{
data.setEscapedAttribute("userDocLink", "href", organization.getUserGuideWebsite());
data.setAttribute("userDocLinkImg", "class", "");
data.getIdData("userDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
if (StringUtils.isNotBlank(organization.getTechnicalGuideWebsite()))
{
data.setEscapedAttribute("technicalDocLink", "href", organization.getTechnicalGuideWebsite());
data.setAttribute("technicalDocLinkImg", "class", "");
data.getIdData("technicalDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
}
data.setContent("serviceListView", ServiceListView.build(organization.getServices().sortByName())); data.setContent("serviceListView", ServiceListView.build(organization.getServices().sortByName()));
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organization.xhtml", data).toString(); String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organization.xhtml", data).toString();

View file

@ -0,0 +1,80 @@
/*
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.htmlize.OrganizationMetricMenuView.MenuItem;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
/**
* The Class OrganizationSpecificMetricPage.
*/
public class OrganizationSpecificMetricPage
{
private static Logger logger = LoggerFactory.getLogger(OrganizationSpecificMetricPage.class);
/**
* Builds the.
*
* @param organization
* the service
* @return the string
* @throws StatoolInfosException
* the statool infos exception
*/
public static String htmlize(final Organization organization) throws StatoolInfosException
{
String result;
try
{
logger.debug("Building oranization specific metric page {}…", organization.get("service.name"));
TagDataManager data = new TagDataManager();
//
data.setContent("headerView", OrganizationHeaderView.htmlize(organization));
data.setContent("metricMenuView", OrganizationMetricMenuView.htmlize(organization, MenuItem.SPECIFIC));
//
int graphicIndex = 0;
//
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationMetricView.xhtml", data).toString();
BreadcrumbTrail trail = new BreadcrumbTrail();
trail.add(organization.getName(), organization.getTechnicalName() + ".xhtml");
trail.add(organization.getName(), organization.getTechnicalName() + "-" + organization.getTechnicalName() + ".xhtml");
result = WebCharterView.build(content, trail);
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building organization specific metric page: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -20,57 +20,43 @@ package fr.devinsy.statoolinfos.htmlize;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.time.YearMonth;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.HtmlizerContext; import fr.devinsy.statoolinfos.HtmlizerContext;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.core.Organization; import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.stats.StatAgent; import fr.devinsy.statoolinfos.htmlize.OrganizationMetricMenuView.MenuItem;
import fr.devinsy.statoolinfos.stats.services.RegistrationStats; import fr.devinsy.statoolinfos.htmlize.charts.ChartColor;
import fr.devinsy.statoolinfos.htmlize.charts.MonthValues;
import fr.devinsy.xidyn.XidynException; import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager; import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils; import fr.devinsy.xidyn.presenters.PresenterUtils;
/** /**
* The Class SocialNetworksPage. * The Class OrganizationStatsPage.
*/ */
public class OrganizationStatsPage public class OrganizationStatsPage
{ {
private static Logger logger = LoggerFactory.getLogger(OrganizationStatsPage.class); private static Logger logger = LoggerFactory.getLogger(OrganizationStatsPage.class);
/** /**
* Builds the. * Htmlize.
* *
* @param organization
* the organization
* @return the string
* @throws StatoolInfosException * @throws StatoolInfosException
* the statool infos exception * the statool infos exception
* @throws IOException * @throws IOException
* Signals that an I/O exception has occurred. * Signals that an I/O exception has occurred.
*/ */
public static void buildAll() throws StatoolInfosException, IOException public static String htmlize(final Organization organization) throws StatoolInfosException, IOException
{ {
Federation federation = HtmlizerContext.instance().getFederation(); String result;
for (Organization organization : federation.getOrganizations())
{
htmlize(organization);
}
}
/**
* Builds the.
*
* @throws StatoolInfosException
* the statool infos exception
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static void htmlize(final Organization organization) throws StatoolInfosException, IOException
{
try try
{ {
logger.debug("Building organization stats page {}…"); logger.debug("Building organization stats page {}…");
@ -79,40 +65,46 @@ public class OrganizationStatsPage
TagDataManager data = new TagDataManager(); TagDataManager data = new TagDataManager();
data.setContent("serviceCountYearChart", ChartHtmlizer.htmlizeServiceCountYearChart(organization));
data.setContent("serviceDateStatusChart", ChartHtmlizer.htmlizeServiceDateStatusChart(organization.getServices()));
data.setContent("turnoutChart", ChartHtmlizer.htmlizeOrganizationTurnoutChart(organization));
data.setContent("hostServerTypeChart", ChartHtmlizer.htmlizeHostServerTypeChart(organization.getServices()));
data.setContent("hostProviderTypeChart", ChartHtmlizer.htmlizeHostProviderTypeChart(organization.getServices()));
data.setContent("serviceInstallTypeChart", ChartHtmlizer.htmlizeServiceInstallTypeChart(organization.getServices()));
data.setContent("serviceCountryChart", ChartHtmlizer.htmlizeServiceCountryChart(organization.getServices()));
// //
{ data.setContent("headerView", OrganizationHeaderView.htmlize(organization));
RegistrationStats stats = StatAgent.statRegistrationTypes(organization.getServices()); data.setContent("metricMenuView", OrganizationMetricMenuView.htmlize(organization, MenuItem.SUMMARY));
data.setContent("registrationTypeChart", ChartHtmlizer.htmlizeRegistrationBarChart(stats)); String tagIds[] = { "fullChart", "lastChart", "2020Chart", "2021Chart" };
data.setContent("registrationNoneTypeChart", ChartHtmlizer.htmlizeRegistrationNonePieChart(stats)); YearMonth starts[] = { null, YearMonth.now().minusMonths(11), YearMonth.of(2020, 01), YearMonth.of(2021, 01) };
data.setContent("registrationFreeTypeChart", ChartHtmlizer.htmlizeRegistrationFreePieChart(stats)); YearMonth ends[] = { null, YearMonth.now(), YearMonth.of(2020, 12), YearMonth.of(2021, 12) };
data.setContent("registrationMemberTypeChart", ChartHtmlizer.htmlizeRegistrationMemberPieChart(stats));
data.setContent("registrationClientTypeChart", ChartHtmlizer.htmlizeRegistrationClientPieChart(stats)); for (int index = 0; index < tagIds.length; index++)
{
String tagId = tagIds[index];
YearMonth start = starts[index];
YearMonth end = ends[index];
int graphicIndex = 0;
MonthValues metric = organization.getMetricMonthValuesAll("metrics.http.hits.visitors");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.GREEN));
metric = organization.getMetricMonthValuesAll("metrics.http.ip.visitors");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.GREEN));
metric = organization.getMetricMonthValuesAll("metrics.http.visits.visitors");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.GREEN));
} }
// //
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationStats.xhtml", data).toString(); String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationMetricView.xhtml", data).toString();
// //
BreadcrumbTrail trail = new BreadcrumbTrail(); BreadcrumbTrail trail = new BreadcrumbTrail();
trail.add(organization.getName(), organization.getTechnicalName() + ".xhtml"); trail.add(organization.getName(), organization.getTechnicalName() + ".xhtml");
String page = WebCharterView.build(content, trail); result = WebCharterView.build(content, trail);
FileUtils.write(new File(htmlizeDirectory, organization.getTechnicalName() + "-stats.xhtml"), page, StandardCharsets.UTF_8);
} }
catch (XidynException exception) catch (XidynException exception)
{ {
throw new StatoolInfosException("Error building organization stats page: " + exception.getMessage(), exception); throw new StatoolInfosException("Error building organization stats page: " + exception.getMessage(), exception);
} }
//
return result;
} }
} }

View file

@ -0,0 +1,155 @@
/*
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import java.time.YearMonth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.htmlize.OrganizationMetricMenuView.MenuItem;
import fr.devinsy.statoolinfos.htmlize.charts.ChartColor;
import fr.devinsy.statoolinfos.htmlize.charts.MonthValues;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
/**
* The Class OrganizationWebMetricPage.
*/
public class OrganizationWebMetricPage
{
private static Logger logger = LoggerFactory.getLogger(OrganizationWebMetricPage.class);
/**
* Builds the.
*
* @param organization
* the service
* @return the string
* @throws StatoolInfosException
* the statool infos exception
*/
public static String htmlize(final Organization organization) throws StatoolInfosException
{
String result;
try
{
logger.debug("Building oranization web metric page {}…", organization.get("service.name"));
TagDataManager data = new TagDataManager();
//
data.setContent("headerView", OrganizationHeaderView.htmlize(organization));
data.setContent("metricMenuView", OrganizationMetricMenuView.htmlize(organization, MenuItem.WEB));
//
String tagIds[] = { "fullChart", "lastChart", "2020Chart", "2021Chart" };
YearMonth starts[] = { null, YearMonth.now().minusMonths(11), YearMonth.of(2020, 01), YearMonth.of(2021, 01) };
YearMonth ends[] = { null, YearMonth.now(), YearMonth.of(2020, 12), YearMonth.of(2021, 12) };
for (int index = 0; index < tagIds.length; index++)
{
String tagId = tagIds[index];
YearMonth start = starts[index];
YearMonth end = ends[index];
int graphicIndex = 0;
MonthValues metric = organization.getMetricMonthValuesAll("metrics.http.hits");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.BLUE));
MonthValues metric4 = organization.getMetricMonthValuesAll("metrics.http.hits.ipv4");
MonthValues metric6 = organization.getMetricMonthValuesAll("metrics.http.hits.ipv6");
data.setContent(tagId, graphicIndex++,
ChartHtmlizer.htmlizeMetricsChart("http.hits (ipv4 + ipv6)", start, end, new ChartColor[] { ChartColor.YELLOW, ChartColor.GREEN }, metric4, metric6));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric4, ChartColor.YELLOW));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric6, ChartColor.GREEN));
metric4 = organization.getMetricMonthValuesAll("metrics.http.hits.bots");
metric6 = organization.getMetricMonthValuesAll("metrics.http.hits.visitors");
data.setContent(tagId, graphicIndex++,
ChartHtmlizer.htmlizeMetricsChart("http.hits (visitors + bots)", start, end, new ChartColor[] { ChartColor.GREEN, ChartColor.YELLOW }, metric6, metric4));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric6, ChartColor.GREEN));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric4, ChartColor.YELLOW));
metric = organization.getMetricMonthValuesAll("metrics.http.errors");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.RED));
metric = organization.getMetricMonthValuesAll("metrics.http.errors.php");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.RED));
metric = organization.getMetricMonthValuesAll("metrics.http.files");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.BLUE));
metric = organization.getMetricMonthValuesAll("metrics.http.pages");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.BLUE));
metric = organization.getMetricMonthValuesAll("metrics.http.bytes");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.BLUE));
metric = organization.getMetricMonthValuesAll("metrics.http.ip");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.BLUE));
metric4 = organization.getMetricMonthValuesAll("metrics.http.ip.bots");
metric6 = organization.getMetricMonthValuesAll("metrics.http.ip.visitors");
data.setContent(tagId, graphicIndex++,
ChartHtmlizer.htmlizeMetricsChart("http.ip (visitors + bots)", start, end, new ChartColor[] { ChartColor.GREEN, ChartColor.YELLOW }, metric6, metric4));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric6, ChartColor.GREEN));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric4, ChartColor.YELLOW));
metric4 = organization.getMetricMonthValuesAll("metrics.http.ip.ipv4");
metric6 = organization.getMetricMonthValuesAll("metrics.http.ip.ipv6");
data.setContent(tagId, graphicIndex++,
ChartHtmlizer.htmlizeMetricsChart("http.ip (ipv4 + ipv6)", start, end, new ChartColor[] { ChartColor.YELLOW, ChartColor.GREEN }, metric4, metric6));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric4, ChartColor.YELLOW));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric6, ChartColor.GREEN));
metric = organization.getMetricMonthValuesAll("metrics.http.visits");
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric, ChartColor.BLUE));
metric4 = organization.getMetricMonthValuesAll("metrics.http.visits.bots");
metric6 = organization.getMetricMonthValuesAll("metrics.http.visits.visitors");
data.setContent(tagId, graphicIndex++,
ChartHtmlizer.htmlizeMetricsChart("http.visits (visitors + bots)", start, end, new ChartColor[] { ChartColor.GREEN, ChartColor.YELLOW }, metric6, metric4));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric6, ChartColor.GREEN));
data.setContent(tagId, graphicIndex++, ChartHtmlizer.htmlizeMetricsChart(start, end, metric4, ChartColor.YELLOW));
}
//
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organizationMetricView.xhtml", data).toString();
BreadcrumbTrail trail = new BreadcrumbTrail();
trail.add(organization.getName(), organization.getTechnicalName() + ".xhtml");
trail.add(organization.getName(), organization.getTechnicalName() + "-" + organization.getTechnicalName() + ".xhtml");
result = WebCharterView.build(content, trail);
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building organization web metric page: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -89,7 +89,7 @@ public class ServiceMetricMenuView
} }
// //
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricMenuView.xhtml", data).toString(); String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/metricMenuView.xhtml", data).toString();
result = XidynUtils.extractBodyContent(content); result = XidynUtils.extractBodyContent(content);
} }
catch (XidynException exception) catch (XidynException exception)

View file

@ -11,41 +11,7 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center"> <div id="organizationHeaderView" />
<div class="row center" style="border: 0px solid yellow;">
<div class="column" style="border: 0px solid red;">
<img id="organizationLogo" src="#" style="width: 100px; height: 100px;"/>
</div>
<div class="column" style="border: 0px solid red; max-width: 500px;">
<div class="content_title"><a id="organizationName" href="#">n/a</a></div>
<div class="content_subtitle"><a id="organizationURL" href="#" style="text-decoration: none;">n/a</a></div>
</div>
<p id="organizationDescription" class="center_table" style="width: 500px;">Description absente…</p>
</div>
<div><span id="organizationStartDateWord">Depuis</span> <span id="organizationStartDate">n/a</span><span id="organizationEndDateData"> <span id="organizationEndDate">n/a</span></span> (<span id="organizationAge">n/a</span>)</div>
<div>Membre <span id="organizationMemberOfName">n/a</span> <span id="organizationMemberOfWord">depuis/:</span> <span id="organizationMemberStartDate">n/a</span><span id="organizationMemberEndDateData"> <span id="organizationMemberEndDate">n/a</span></span> (<span id="organizationMemberAge">n/a</span>)</div>
<div class="content_infos" style="margin: 5px;">
Liens :
<a id="legalLink" href="#"><img id="legalLinkImg" src="circle-icons/ribbon.svg" class="disabled" title="Mentions légales"/></a>
<a id="contactLink" href="#"><img id="contactLinkImg" src="circle-icons/contacts.svg" class="disabled" title="Page web de contact"/></a>
<a id="emailLink" href="#"><img id="emailLinkImg" src="circle-icons/mail.svg" class="disabled" title="Courriel de contact/support"/></a>
<a id="userDocLink" href="#"><img id="userDocLinkImg" src="circle-icons/bookshelf.svg" class="disabled" title="Documentation"/></a>
<a id="technicalDocLink" href="#"><img id="technicalDocLinkImg" src="circle-icons/tools.svg" class="disabled" title="Documentation technique"/></a>
<a id="rawCheckLink" href="#"><img id="rawCheckLinkImg" src="circle-icons/clipboard-mono.svg" title="Fichier propriétés analysé"/></a>
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/document-mono.svg" title="Fichier propriétés"/></a>
<a id="crawlLink" href="#"><img id="crawlLinkImg" src="circle-icons/download-mono.svg" title="Statut des téléchargements"/></a>
<a id="statsLink" href="#"><img id="statsLinkImg" src="circle-icons/barchart-mono.svg" title="Statistiques"/></a>
<div style="display: inline-block; vertical-align: middle; font-size: smaller; margin-left: 2px; width: 35px;">
<a id="alertLink" href="#" style="text-decoration: none;">
<div id="errorCount" class="bg_error center" title="Propriétés en erreurs">n/a</div>
<div id="warningCount" class="bg_warning center" title="Propriétés attendues">n/a</div>
<div id="voidCount" class="bg_void center" title="Propriétés Inconnues">n/a</div>
</a>
</div>
</div>
<br/>
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
</div>
<div id="serviceListView" /> <div id="serviceListView" />
</body> </body>
</html> </html>

View file

@ -11,9 +11,10 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="row center_table" style="width: 1100px;"> <div id="headerView" />
<div id="metricMenuView" />
<h2 id="title" class="center">Statistiques</h2> <div id="metricZone" class="row center_table" style="width: 1100px;">
<!-- h2 id="title" class="center">Statistiques</h2-->
<div> <div>
<div> <div>
<div id="turnoutChart" class="chartborder" style="width: 250px; height: 200px; display: inline-block;"/> <div id="turnoutChart" class="chartborder" style="width: 250px; height: 200px; display: inline-block;"/>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>StatoolInfos</title>
<meta charset="UTF-8" />
<meta name="keywords" content="statoolinfos,devinsy,federation" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="statoolinfos.css" />
<script src="sorttable.js" />
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div class="center">
<div class="row center" style="border: 0px solid yellow;">
<div class="column" style="border: 0px solid red;">
<img id="organizationLogo" src="#" style="width: 100px; height: 100px;"/>
</div>
<div class="column" style="border: 0px solid red; max-width: 500px;">
<div class="content_title"><a id="organizationName" href="#">n/a</a></div>
<div class="content_subtitle"><a id="organizationURL" href="#" style="text-decoration: none;">n/a</a></div>
</div>
<p id="organizationDescription" class="center_table" style="width: 500px;">Description absente…</p>
</div>
<div><span id="organizationStartDateWord">Depuis</span> <span id="organizationStartDate">n/a</span><span id="organizationEndDateData"> <span id="organizationEndDate">n/a</span></span> (<span id="organizationAge">n/a</span>)</div>
<div>Membre <span id="organizationMemberOfName">n/a</span> <span id="organizationMemberOfWord">depuis/:</span> <span id="organizationMemberStartDate">n/a</span><span id="organizationMemberEndDateData"> <span id="organizationMemberEndDate">n/a</span></span> (<span id="organizationMemberAge">n/a</span>)</div>
<div class="content_infos" style="margin: 5px;">
Liens :
<a id="legalLink" href="#"><img id="legalLinkImg" src="circle-icons/ribbon.svg" class="disabled" title="Mentions légales"/></a>
<a id="contactLink" href="#"><img id="contactLinkImg" src="circle-icons/contacts.svg" class="disabled" title="Page web de contact"/></a>
<a id="emailLink" href="#"><img id="emailLinkImg" src="circle-icons/mail.svg" class="disabled" title="Courriel de contact/support"/></a>
<a id="userDocLink" href="#"><img id="userDocLinkImg" src="circle-icons/bookshelf.svg" class="disabled" title="Documentation"/></a>
<a id="technicalDocLink" href="#"><img id="technicalDocLinkImg" src="circle-icons/tools.svg" class="disabled" title="Documentation technique"/></a>
<a id="rawCheckLink" href="#"><img id="rawCheckLinkImg" src="circle-icons/clipboard-mono.svg" title="Fichier propriétés analysé"/></a>
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/document-mono.svg" title="Fichier propriétés"/></a>
<a id="crawlLink" href="#"><img id="crawlLinkImg" src="circle-icons/download-mono.svg" title="Statut des téléchargements"/></a>
<a id="statsLink" href="#"><img id="statsLinkImg" src="circle-icons/barchart-mono.svg" title="Statistiques"/></a>
<div style="display: inline-block; vertical-align: middle; font-size: smaller; margin-left: 2px; width: 35px;">
<a id="alertLink" href="#" style="text-decoration: none;">
<div id="errorCount" class="bg_error center" title="Propriétés en erreurs">n/a</div>
<div id="warningCount" class="bg_warning center" title="Propriétés attendues">n/a</div>
<div id="voidCount" class="bg_void center" title="Propriétés Inconnues">n/a</div>
</a>
</div>
</div>
<br/>
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
</div>
</body>
</html>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>StatoolInfos</title>
<meta charset="UTF-8" />
<meta name="keywords" content="statoolinfos,devinsy,federation" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="statoolinfos.css" />
<script src="sorttable.js" />
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div id="headerView" />
<div id="metricZone">
<div id="metricMenuView" />
<div id="fullCharts" style="display: none;">
<div id="fullChart" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
</div>
<div id="lastCharts" style="display: block;">
<div id="lastChart" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
</div>
<div id="2020Charts" style="display: none;">
<div id="2020Chart" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
</div>
<div id="2021Charts" style="display: none;">
<div id="2021Chart" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
</div>
</div>
</body>
</html>

View file

@ -13,7 +13,7 @@
<body> <body>
<div id="headerView" /> <div id="headerView" />
<div id="metricZone"> <div id="metricZone">
<h2 id="title" class="center">Statistiques</h2> <!-- h2 id="title" class="center">Statistiques</h2-->
<div id="serviceMetricMenuView" /> <div id="serviceMetricMenuView" />
<div> <div>
<div> <div>