Removed HTML cache for organizations and services metrics pages.
The combinatorial is too large: - 48 pages by item - 100 organizations + 300 services = 400 items - => ~20 000 pages - 200kB/page - => 4GB in memory - ==> no way. Metrics pages are so numerous than they have to build on demand.
This commit is contained in:
parent
fba9e6a7ab
commit
dc73cd79f5
8 changed files with 176 additions and 216 deletions
|
@ -66,34 +66,29 @@ public class MetricGenericPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Organization > Metrics > Summary");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Génériques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/generic.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Génériques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/generic.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -64,34 +64,29 @@ public class MetricSpecificPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Organization > Metrics > Specific");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Spécifiques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/specific.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Spécifiques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/specific.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -66,34 +66,29 @@ public class MetricSummaryPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Organization > Metrics > Summary");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/summary.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/summary.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -65,34 +65,29 @@ public class MetricWebPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Organization > Metrics > Web");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo());
|
||||
UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = OrganizationHeaderView.htmlize(organization, uptimes);
|
||||
String contentView = htmlize(organization, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/web.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/web.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -67,40 +67,35 @@ public class MetricGenericPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Service > MetricGenericPage");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo());
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo());
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Générique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/generic.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Générique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/generic.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -67,40 +67,35 @@ public class MetricSpecificPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Service > MetricGenericPage");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString());
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString());
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Spécifique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/specific.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Spécifique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/specific.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -67,40 +67,35 @@ public class MetricSummaryPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Service > MetricSummaryPage");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo());
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo());
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/summary.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/summary.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
|
@ -67,40 +67,35 @@ public class MetricWebPage extends HttpServlet
|
|||
{
|
||||
logger.info("PAGE Service > MetricGenericPage");
|
||||
|
||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
||||
if (html == null)
|
||||
{
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
// Get parameters.
|
||||
// ===============
|
||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||
PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period"));
|
||||
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString());
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
// Use parameters.
|
||||
// ===============
|
||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString());
|
||||
Organization organization = service.getOrganization();
|
||||
UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal();
|
||||
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
// Send response.
|
||||
// ==============
|
||||
String headerView = ServiceHeaderView.htmlize(service, uptimeJournal);
|
||||
String contentView = htmlize(service, viewMenu, periodMenu);
|
||||
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/web.xhtml");
|
||||
BreadcrumbTrail trail = new BreadcrumbTrail();
|
||||
trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/");
|
||||
trail.add("Organisations", "/federation/organizations/");
|
||||
trail.add(organization.getName(), "/federation/organizations/" + organization.getTechnicalName() + "/");
|
||||
trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml");
|
||||
trail.add(service.getName(),
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/");
|
||||
trail.add("Métriques",
|
||||
"/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/metrics/");
|
||||
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||
+ "/metrics/web.xhtml");
|
||||
|
||||
html = WebCharterView.build(headerView, contentView, trail);
|
||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
||||
}
|
||||
String html = WebCharterView.build(headerView, contentView, trail);
|
||||
|
||||
// Display page.
|
||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||
|
|
Loading…
Reference in a new issue