diff --git a/src/website/federation/organizations/organization/metrics/MetricGenericPage.java b/src/website/federation/organizations/organization/metrics/MetricGenericPage.java index cdc7617..6d59be5 100644 --- a/src/website/federation/organizations/organization/metrics/MetricGenericPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricGenericPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java b/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java index 471c5e4..1e971ac 100644 --- a/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java b/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java index 7852ba7..de983f2 100644 --- a/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/metrics/MetricWebPage.java b/src/website/federation/organizations/organization/metrics/MetricWebPage.java index 2bc898c..ec206b6 100644 --- a/src/website/federation/organizations/organization/metrics/MetricWebPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricWebPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java index 13a5f69..f993735 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java index a2e07a1..3a30234 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java index 1e191a1..1afaf24 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java @@ -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"); diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java index 01e3b99..9b0df93 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java @@ -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");