diff --git a/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java b/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java index 4889ad5..2820a80 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ChartHtmlizer.java @@ -331,9 +331,12 @@ public class ChartHtmlizer { Year current = dataset.getOldestTimestamp(); - if ((startTarget == null) || (current.isBefore(startTarget))) + if (current != null) { - startTarget = current; + if ((startTarget == null) || (current.isBefore(startTarget))) + { + startTarget = current; + } } } } @@ -409,9 +412,12 @@ public class ChartHtmlizer { YearMonth current = dataset.getOldestTimestamp(); - if ((startTarget == null) || (current.isBefore(startTarget))) + if (current != null) { - startTarget = current; + if ((startTarget == null) || (current.isBefore(startTarget))) + { + startTarget = current; + } } } } @@ -487,9 +493,12 @@ public class ChartHtmlizer { YearWeek current = dataset.getOldestTimestamp(); - if ((startTarget == null) || (current.isBefore(startTarget))) + if (current != null) { - startTarget = current; + if ((startTarget == null) || (current.isBefore(startTarget))) + { + startTarget = current; + } } } } diff --git a/src/fr/devinsy/statoolinfos/htmlize/FederationMetricSummaryPage.java b/src/fr/devinsy/statoolinfos/htmlize/FederationMetricSummaryPage.java index f913f38..00272b6 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/FederationMetricSummaryPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/FederationMetricSummaryPage.java @@ -68,9 +68,9 @@ public class FederationMetricSummaryPage data.setContent("headerView", FederationHeaderView.htmlize(federation)); data.setContent("metricMenuView", FederationMetricMenuView.htmlize(federation, TypeMenu.SUMMARY, view, period)); - FederationMetricHtmlizer.htmlize(data, "http.hits.visitors", federation, view, period, "metrics.http.hits.visitors", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.hits.humans", federation, view, period, "metrics.http.hits.humans", ChartColor.GREEN); FederationMetricHtmlizer.htmlize(data, "http.visitors.humans", federation, view, period, "metrics.http.visitors.humans", ChartColor.GREEN); - FederationMetricHtmlizer.htmlize(data, "http.visits.visitors", federation, view, period, "metrics.http.visits.visitors", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.visits.humans", federation, view, period, "metrics.http.visits.humans", ChartColor.GREEN); // String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml", data).toString(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/FederationMetricWebPage.java b/src/fr/devinsy/statoolinfos/htmlize/FederationMetricWebPage.java index 6d01659..332bc1c 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/FederationMetricWebPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/FederationMetricWebPage.java @@ -70,12 +70,17 @@ public class FederationMetricWebPage FederationMetricHtmlizer.htmlize(data, "http.hits.ipv4", federation, view, period, "metrics.http.hits.ipv4", ChartColor.YELLOW); FederationMetricHtmlizer.htmlize(data, "http.hits.ipv6", federation, view, period, "metrics.http.hits.ipv6", ChartColor.GREEN); - FederationMetricHtmlizer.htmlize(data, "http.hits-visitorsbots", federation, view, period, "http.hits (visitors + bots)", "metrics.http.hits.visitors", ChartColor.GREEN, + FederationMetricHtmlizer.htmlize(data, "http.hits-humansbots", federation, view, period, "http.hits (humans + bots)", "metrics.http.hits.humans", ChartColor.GREEN, "metrics.http.hits.bots", ChartColor.YELLOW); - FederationMetricHtmlizer.htmlize(data, "http.hits.visitors", federation, view, period, "metrics.http.hits.visitors", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.hits.humans", federation, view, period, "metrics.http.hits.humans", ChartColor.GREEN); FederationMetricHtmlizer.htmlize(data, "http.hits.bots", federation, view, period, "metrics.http.hits.bots", ChartColor.YELLOW); + FederationMetricHtmlizer.htmlize(data, "http.hits.humans-ipv4ipv6", federation, view, period, "http.hits.humans (ipv4 + ipv6)", "metrics.http.hits.humans.ipv4", ChartColor.YELLOW, + "metrics.http.hits.humans.ipv6", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.hits.humans.ipv4", federation, view, period, "metrics.http.hits.humans.ipv4", ChartColor.YELLOW); + FederationMetricHtmlizer.htmlize(data, "http.hits.humans.ipv6", federation, view, period, "metrics.http.hits.humans.ipv6", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.errors", federation, view, period, "metrics.http.errors", ChartColor.RED); FederationMetricHtmlizer.htmlize(data, "http.errors.php", federation, view, period, "metrics.http.errors.php", ChartColor.RED); @@ -85,9 +90,9 @@ public class FederationMetricWebPage FederationMetricHtmlizer.htmlize(data, "http.ip", federation, view, period, "metrics.http.ip", ChartColor.BLUE); - FederationMetricHtmlizer.htmlize(data, "http.ip-visitorsbots", federation, view, period, "http.ip (visitors + bots)", "metrics.http.ip.visitors", ChartColor.GREEN, "metrics.http.ip.bots", + FederationMetricHtmlizer.htmlize(data, "http.ip-humansbots", federation, view, period, "http.ip (humans + bots)", "metrics.http.ip.humans", ChartColor.GREEN, "metrics.http.ip.bots", ChartColor.YELLOW); - FederationMetricHtmlizer.htmlize(data, "http.ip.visitors", federation, view, period, "metrics.http.ip.visitors", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.ip.humans", federation, view, period, "metrics.http.ip.humans", ChartColor.GREEN); FederationMetricHtmlizer.htmlize(data, "http.ip.bots", federation, view, period, "metrics.http.ip.bots", ChartColor.YELLOW); FederationMetricHtmlizer.htmlize(data, "http.ip-ipv4ipv6", federation, view, period, "http.ip (ipv4 + ipv6)", "metrics.http.ip.ipv4", ChartColor.YELLOW, "metrics.http.ip.ipv6", @@ -109,10 +114,10 @@ public class FederationMetricWebPage FederationMetricHtmlizer.htmlize(data, "http.visits", federation, view, period, "metrics.http.visits", ChartColor.BLUE); - FederationMetricHtmlizer.htmlize(data, "http.visits-visitorsbots", federation, view, period, "http.visits (visitors + bots)", "metrics.http.visits.visitors", ChartColor.GREEN, + FederationMetricHtmlizer.htmlize(data, "http.visits-humansbots", federation, view, period, "http.visits (humans + bots)", "metrics.http.visits.humans", ChartColor.GREEN, "metrics.http.visits.bots", ChartColor.YELLOW); FederationMetricHtmlizer.htmlize(data, "http.visits.bots", federation, view, period, "metrics.http.visits.bots", ChartColor.YELLOW); - FederationMetricHtmlizer.htmlize(data, "http.visits.visitors", federation, view, period, "metrics.http.visits.visitors", ChartColor.GREEN); + FederationMetricHtmlizer.htmlize(data, "http.visits.humans", federation, view, period, "metrics.http.visits.humans", ChartColor.GREEN); // String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml", data).toString(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricSummaryPage.java b/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricSummaryPage.java index ad52261..d618dda 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricSummaryPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricSummaryPage.java @@ -69,9 +69,9 @@ public class OrganizationMetricSummaryPage data.setContent("headerView", OrganizationHeaderView.htmlize(organization)); data.setContent("metricMenuView", OrganizationMetricMenuView.htmlize(organization, TypeMenu.SUMMARY, view, period)); - OrganizationMetricHtmlizer.htmlize(data, "http.hits.visitors", organization, view, period, "metrics.http.hits.visitors", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.hits.humans", organization, view, period, "metrics.http.hits.humans", ChartColor.GREEN); OrganizationMetricHtmlizer.htmlize(data, "http.visitors.humans", organization, view, period, "metrics.http.visitors.humans", ChartColor.GREEN); - OrganizationMetricHtmlizer.htmlize(data, "http.visits.visitors", organization, view, period, "metrics.http.visits.visitors", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.visits.humans", organization, view, period, "metrics.http.visits.humans", ChartColor.GREEN); // String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml", data).toString(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricWebPage.java b/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricWebPage.java index efc7c47..17e7cd6 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricWebPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/OrganizationMetricWebPage.java @@ -78,11 +78,16 @@ public class OrganizationMetricWebPage OrganizationMetricHtmlizer.htmlize(data, "http.hits.ipv4", organization, view, period, "metrics.http.hits.ipv4", ChartColor.YELLOW); OrganizationMetricHtmlizer.htmlize(data, "http.hits.ipv6", organization, view, period, "metrics.http.hits.ipv6", ChartColor.GREEN); - OrganizationMetricHtmlizer.htmlize(data, "http.hits-visitorsbots", organization, view, period, "http.hits (visitors + bots)", "metrics.http.hits.visitors", ChartColor.GREEN, + OrganizationMetricHtmlizer.htmlize(data, "http.hits-humansbots", organization, view, period, "http.hits (humans + bots)", "metrics.http.hits.humans", ChartColor.GREEN, "metrics.http.hits.bots", ChartColor.YELLOW); - OrganizationMetricHtmlizer.htmlize(data, "http.hits.visitors", organization, view, period, "metrics.http.hits.visitors", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.hits.humans", organization, view, period, "metrics.http.hits.humans", ChartColor.GREEN); OrganizationMetricHtmlizer.htmlize(data, "http.hits.bots", organization, view, period, "metrics.http.hits.bots", ChartColor.YELLOW); + OrganizationMetricHtmlizer.htmlize(data, "http.hits.humans-ipv4ipv6", organization, view, period, "http.hits.humans (ipv4 + ipv6)", "metrics.http.hits.humans.ipv4", ChartColor.YELLOW, + "metrics.http.hits.humans.ipv6", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.hits.humans.ipv4", organization, view, period, "metrics.http.hits.humans.ipv4", ChartColor.YELLOW); + OrganizationMetricHtmlizer.htmlize(data, "http.hits.humans.ipv6", organization, view, period, "metrics.http.hits.humans.ipv6", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.errors", organization, view, period, "metrics.http.errors", ChartColor.RED); OrganizationMetricHtmlizer.htmlize(data, "http.errors.php", organization, view, period, "metrics.http.errors.php", ChartColor.RED); @@ -92,9 +97,9 @@ public class OrganizationMetricWebPage OrganizationMetricHtmlizer.htmlize(data, "http.ip", organization, view, period, "metrics.http.ip", ChartColor.BLUE); - OrganizationMetricHtmlizer.htmlize(data, "http.ip-visitorsbots", organization, view, period, "http.ip (visitors + bots)", "metrics.http.ip.visitors", ChartColor.GREEN, + OrganizationMetricHtmlizer.htmlize(data, "http.ip-humansbots", organization, view, period, "http.ip (humans + bots)", "metrics.http.ip.humans", ChartColor.GREEN, "metrics.http.ip.bots", ChartColor.YELLOW); - OrganizationMetricHtmlizer.htmlize(data, "http.ip.visitors", organization, view, period, "metrics.http.ip.visitors", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.ip.humans", organization, view, period, "metrics.http.ip.humans", ChartColor.GREEN); OrganizationMetricHtmlizer.htmlize(data, "http.ip.bots", organization, view, period, "metrics.http.ip.bots", ChartColor.YELLOW); OrganizationMetricHtmlizer.htmlize(data, "http.ip-ipv4ipv6", organization, view, period, "http.ip (ipv4 + ipv6)", "metrics.http.ip.ipv4", ChartColor.YELLOW, "metrics.http.ip.ipv6", @@ -116,10 +121,10 @@ public class OrganizationMetricWebPage OrganizationMetricHtmlizer.htmlize(data, "http.visits", organization, view, period, "metrics.http.visits", ChartColor.BLUE); - OrganizationMetricHtmlizer.htmlize(data, "http.visits-visitorsbots", organization, view, period, "http.visits (visitors + bots)", "metrics.http.visits.visitors", ChartColor.GREEN, + OrganizationMetricHtmlizer.htmlize(data, "http.visits-humansbots", organization, view, period, "http.visits (humans + bots)", "metrics.http.visits.humans", ChartColor.GREEN, "metrics.http.visits.bots", ChartColor.YELLOW); OrganizationMetricHtmlizer.htmlize(data, "http.visits.bots", organization, view, period, "metrics.http.visits.bots", ChartColor.YELLOW); - OrganizationMetricHtmlizer.htmlize(data, "http.visits.visitors", organization, view, period, "metrics.http.visits.visitors", ChartColor.GREEN); + OrganizationMetricHtmlizer.htmlize(data, "http.visits.humans", organization, view, period, "metrics.http.visits.humans", ChartColor.GREEN); // String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml", data).toString(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricHtmlizer.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricHtmlizer.java index 2df0904..6f2505b 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricHtmlizer.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricHtmlizer.java @@ -129,7 +129,7 @@ public class ServiceMetricHtmlizer * @throws StatoolInfosException * the statool infos exception */ - public static void htmlizeData(final TagDataManager data, final String metricId, final Service service, final ViewMenu view, final PeriodMenu period, final String metricLabel, + public static void htmlize(final TagDataManager data, final String metricId, final Service service, final ViewMenu view, final PeriodMenu period, final String metricLabel, final String metricPath1, final ChartColor color1, final String metricPath2, final ChartColor color2) throws StatoolInfosException { if (view == ViewMenu.YEARS) diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricSummaryPage.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricSummaryPage.java index 2ffd0ec..3cba792 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricSummaryPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricSummaryPage.java @@ -69,9 +69,9 @@ public class ServiceMetricSummaryPage data.setContent("headerView", ServiceHeaderView.htmlize(service)); data.setContent("metricMenuView", ServiceMetricMenuView.htmlize(service, TypeMenu.SUMMARY, view, period)); - ServiceMetricHtmlizer.htmlize(data, "http.hits.visitors", service, view, period, "metrics.http.hits.visitors", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.hits.humans", service, view, period, "metrics.http.hits.humans", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.visitors.humans", service, view, period, "metrics.http.visitors.humans", ChartColor.GREEN); - ServiceMetricHtmlizer.htmlize(data, "http.visits.visitors", service, view, period, "metrics.http.visits.visitors", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.visits.humans", service, view, period, "metrics.http.visits.humans", ChartColor.GREEN); // String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml", data).toString(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricWebPage.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricWebPage.java index 056e2e7..daa3ba3 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricWebPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceMetricWebPage.java @@ -71,17 +71,22 @@ public class ServiceMetricWebPage ServiceMetricHtmlizer.htmlize(data, "http.hits", service, view, period, "metrics.http.hits", ChartColor.BLUE); - ServiceMetricHtmlizer.htmlizeData(data, "http.hits-ipv4ipv6", service, view, period, "http.hits (ipv4 + ipv6)", "metrics.http.hits.ipv4", ChartColor.YELLOW, "metrics.http.hits.ipv6", + ServiceMetricHtmlizer.htmlize(data, "http.hits-ipv4ipv6", service, view, period, "http.hits (ipv4 + ipv6)", "metrics.http.hits.ipv4", ChartColor.YELLOW, "metrics.http.hits.ipv6", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.hits.ipv4", service, view, period, "metrics.http.hits.ipv4", ChartColor.YELLOW); ServiceMetricHtmlizer.htmlize(data, "http.hits.ipv6", service, view, period, "metrics.http.hits.ipv6", ChartColor.GREEN); - ServiceMetricHtmlizer.htmlizeData(data, "http.hits-visitorsbots", service, view, period, "http.hits (visitors + bots)", "metrics.http.hits.visitors", ChartColor.GREEN, + ServiceMetricHtmlizer.htmlize(data, "http.hits-humansbots", service, view, period, "http.hits (humans + bots)", "metrics.http.hits.humans", ChartColor.GREEN, "metrics.http.hits.bots", ChartColor.YELLOW); - ServiceMetricHtmlizer.htmlize(data, "http.hits.visitors", service, view, period, "metrics.http.hits.visitors", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.hits.humans", service, view, period, "metrics.http.hits.humans", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.hits.bots", service, view, period, "metrics.http.hits.bots", ChartColor.YELLOW); + ServiceMetricHtmlizer.htmlize(data, "http.hits.humans-ipv4ipv6", service, view, period, "http.hits.humans (ipv4 + ipv6)", "metrics.http.hits.humans.ipv4", ChartColor.YELLOW, + "metrics.http.hits.humans.ipv6", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.hits.humans.ipv4", service, view, period, "metrics.http.hits.humans.ipv4", ChartColor.YELLOW); + ServiceMetricHtmlizer.htmlize(data, "http.hits.humans.ipv6", service, view, period, "metrics.http.hits.humans.ipv6", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.errors", service, view, period, "metrics.http.errors", ChartColor.RED); ServiceMetricHtmlizer.htmlize(data, "http.errors.php", service, view, period, "metrics.http.errors.php", ChartColor.RED); @@ -91,35 +96,34 @@ public class ServiceMetricWebPage ServiceMetricHtmlizer.htmlize(data, "http.ip", service, view, period, "metrics.http.ip", ChartColor.BLUE); - ServiceMetricHtmlizer.htmlizeData(data, "http.ip-visitorsbots", service, view, period, "http.ip (visitors + bots)", "metrics.http.ip.visitors", ChartColor.GREEN, "metrics.http.ip.bots", + ServiceMetricHtmlizer.htmlize(data, "http.ip-humansbots", service, view, period, "http.ip (humans + bots)", "metrics.http.ip.humans", ChartColor.GREEN, "metrics.http.ip.bots", ChartColor.YELLOW); - ServiceMetricHtmlizer.htmlize(data, "http.ip.visitors", service, view, period, "metrics.http.ip.visitors", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.ip.humans", service, view, period, "metrics.http.ip.humans", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.ip.bots", service, view, period, "metrics.http.ip.bots", ChartColor.YELLOW); - ServiceMetricHtmlizer.htmlizeData(data, "http.ip-ipv4ipv6", service, view, period, "http.ip (ipv4 + ipv6)", "metrics.http.ip.ipv4", ChartColor.YELLOW, "metrics.http.ip.ipv6", + ServiceMetricHtmlizer.htmlize(data, "http.ip-ipv4ipv6", service, view, period, "http.ip (ipv4 + ipv6)", "metrics.http.ip.ipv4", ChartColor.YELLOW, "metrics.http.ip.ipv6", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.ip.ipv4", service, view, period, "metrics.http.ip.ipv4", ChartColor.YELLOW); ServiceMetricHtmlizer.htmlize(data, "http.ip.ipv6", service, view, period, "metrics.http.ip.ipv6", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.visitors", service, view, period, "metrics.http.ip", ChartColor.BLUE); - ServiceMetricHtmlizer.htmlizeData(data, "http.visitors-humansbots", service, view, period, "http.visitors (humans + bots)", "metrics.http.visitors.humans", ChartColor.GREEN, + ServiceMetricHtmlizer.htmlize(data, "http.visitors-humansbots", service, view, period, "http.visitors (humans + bots)", "metrics.http.visitors.humans", ChartColor.GREEN, "metrics.http.visitors.bots", ChartColor.YELLOW); ServiceMetricHtmlizer.htmlize(data, "http.visitors.humans", service, view, period, "metrics.http.visitors.humans", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.visitors.bots", service, view, period, "metrics.http.visitors.bots", ChartColor.YELLOW); - ServiceMetricHtmlizer.htmlizeData(data, "http.visitors-ipv4ipv6", service, view, period, "http.visitors (ipv4 + ipv6)", "metrics.http.visitors.ipv4", ChartColor.YELLOW, + ServiceMetricHtmlizer.htmlize(data, "http.visitors-ipv4ipv6", service, view, period, "http.visitors (ipv4 + ipv6)", "metrics.http.visitors.ipv4", ChartColor.YELLOW, "metrics.http.visitors.ipv6", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.visitors.ipv4", service, view, period, "metrics.http.visitors.ipv4", ChartColor.YELLOW); ServiceMetricHtmlizer.htmlize(data, "http.visitors.ipv6", service, view, period, "metrics.http.visitors.ipv6", ChartColor.GREEN); ServiceMetricHtmlizer.htmlize(data, "http.visits", service, view, period, "metrics.http.visits", ChartColor.BLUE); - ServiceMetricHtmlizer.htmlizeData(data, "http.visits-visitorsbots", service, view, period, "http.visits (visitors + bots)", "metrics.http.visits.visitors", ChartColor.GREEN, - "metrics.http.visits.bots", - ChartColor.YELLOW); + ServiceMetricHtmlizer.htmlize(data, "http.visits-humansbots", service, view, period, "http.visits (humans + bots)", "metrics.http.visits.humans", ChartColor.GREEN, + "metrics.http.visits.bots", ChartColor.YELLOW); ServiceMetricHtmlizer.htmlize(data, "http.visits.bots", service, view, period, "metrics.http.visits.bots", ChartColor.YELLOW); - ServiceMetricHtmlizer.htmlize(data, "http.visits.visitors", service, view, period, "metrics.http.visits.visitors", ChartColor.GREEN); + ServiceMetricHtmlizer.htmlize(data, "http.visits.humans", service, view, period, "metrics.http.visits.humans", ChartColor.GREEN); // String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml", data).toString(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml b/src/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml index b8c4601..25b7c5b 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/serviceMetricSummaryView.xhtml @@ -15,9 +15,9 @@
-
+
-
+
diff --git a/src/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml b/src/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml index f6f277e..c252430 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/serviceMetricWebView.xhtml @@ -22,9 +22,13 @@

-
-
+
+
+
+
+
+

http.errors

@@ -42,8 +46,8 @@

-
-
+
+

http.visitors

@@ -60,8 +64,8 @@

http.visits

-
-
+
+
diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java b/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java index f65961e..1a206bf 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java +++ b/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLogAnalyzer.java @@ -48,12 +48,12 @@ public class HttpAccessLogAnalyzer private PathCounters counters; private VisitCounters visits; private VisitCounters botVisits; - private VisitCounters visitorVisits; + private VisitCounters humanVisits; private IpCounters ips; private IpCounters ipv4; private IpCounters ipv6; private IpCounters botIps; - private IpCounters visitorIps; + private IpCounters humanIps; private VisitorCounters visitors; private VisitorCounters ipv4Visitors; private VisitorCounters ipv6Visitors; @@ -68,12 +68,12 @@ public class HttpAccessLogAnalyzer this.counters = new PathCounters(); this.visits = new VisitCounters(); this.botVisits = new VisitCounters(); - this.visitorVisits = new VisitCounters(); + this.humanVisits = new VisitCounters(); this.ips = new IpCounters(); this.ipv4 = new IpCounters(); this.ipv6 = new IpCounters(); this.botIps = new IpCounters(); - this.visitorIps = new IpCounters(); + this.humanIps = new IpCounters(); this.visitors = new VisitorCounters(); this.ipv4Visitors = new VisitorCounters(); @@ -98,11 +98,11 @@ public class HttpAccessLogAnalyzer result.putAll(this.ipv4.getCounters("metrics.http.ip.ipv4")); result.putAll(this.ipv6.getCounters("metrics.http.ip.ipv6")); result.putAll(this.botIps.getCounters("metrics.http.ip.bots")); - result.putAll(this.visitorIps.getCounters("metrics.http.ip.visitors")); + result.putAll(this.humanIps.getCounters("metrics.http.ip.humans")); result.putAll(this.visits.getCounters("metrics.http.visits")); result.putAll(this.botVisits.getCounters("metrics.http.visits.bots")); - result.putAll(this.visitorVisits.getCounters("metrics.http.visits.visitors")); + result.putAll(this.humanVisits.getCounters("metrics.http.visits.humans")); result.putAll(this.visitors.getCounters("metrics.http.visitors")); result.putAll(this.ipv4Visitors.getCounters("metrics.http.visitors.ipv4")); @@ -172,6 +172,8 @@ public class HttpAccessLogAnalyzer String date = log.getDate(); // metrics.http.hits + // metrics.http.hits.ipv4 + // metrics.http.hits.ipv6 this.counters.inc("metrics.http.hits", year, yearMonth, yearWeek, date); if (log.isIPv4()) @@ -199,18 +201,18 @@ public class HttpAccessLogAnalyzer } else { - // metrics.http.hits.visitors.* - this.counters.inc("metrics.http.hits.visitors", year, yearMonth, yearWeek, date); + // metrics.http.hits.humans.* + this.counters.inc("metrics.http.hits.humans", year, yearMonth, yearWeek, date); if (log.isIPv4()) { - // metrics.http.hits.visitors.ipv4.* - this.counters.inc("metrics.http.hits.visitors.ipv4", year, yearMonth, yearWeek, date); + // metrics.http.hits.humans.ipv4.* + this.counters.inc("metrics.http.hits.humans.ipv4", year, yearMonth, yearWeek, date); } else { - // metrics.http.hits.visitors.ipv6.* - this.counters.inc("metrics.http.hits.visitors.ipv6", year, yearMonth, yearWeek, date); + // metrics.http.hits.humans.ipv6.* + this.counters.inc("metrics.http.hits.humans.ipv6", year, yearMonth, yearWeek, date); } } @@ -220,22 +222,6 @@ public class HttpAccessLogAnalyzer this.counters.inc("metrics.http.pages", year, yearMonth, yearWeek, date); } - // metrics.http.status.XXXX - String status = String.valueOf(log.getStatus().getCode()); - this.counters.inc("metrics.http.status." + status, year, yearMonth, yearWeek, date); - - // metrics.http.os.XXXXX - UserAgentOS os = log.getUserAgent().getOS(); - this.counters.inc("metrics.http.os." + os.toString().toLowerCase(), year, yearMonth, yearWeek, date); - - // metrics.http.browsers.XXXXX - UserAgentBrowser browser = log.getUserAgent().getBrowser(); - this.counters.inc("metrics.http.browsers." + browser.toString().toLowerCase(), year, yearMonth, yearWeek, date); - - // metrics.http.devices.XXXXX = - UserAgentDevice device = log.getUserAgent().getDevice(); - this.counters.inc("metrics.http.devices." + device.toString().toLowerCase(), year, yearMonth, yearWeek, date); - // metrics.http.ip.* = this.ips.put(log.getIp(), year, yearMonth, yearWeek, date); @@ -251,14 +237,14 @@ public class HttpAccessLogAnalyzer } // metrics.http.ip.bots.* - // metrics.http.ip.visitors.* + // metrics.http.ip.humans.* if (log.isBot()) { this.botIps.put(log.getIp(), year, yearMonth, yearWeek, date); } else { - this.visitorIps.put(log.getIp(), year, yearMonth, yearWeek, date); + this.humanIps.put(log.getIp(), year, yearMonth, yearWeek, date); } // metrics.http.visits.* = @@ -272,8 +258,8 @@ public class HttpAccessLogAnalyzer } else { - this.visitorVisits.putVisit(log); - this.visitorVisits.storeTimeMarks(year, yearMonth, yearWeek, date); + this.humanVisits.putVisit(log); + this.humanVisits.storeTimeMarks(year, yearMonth, yearWeek, date); } // @@ -303,7 +289,21 @@ public class HttpAccessLogAnalyzer this.humanVisitors.put(log.getIp(), log.getUserAgent(), year, yearMonth, yearWeek, date); } - // + // metrics.http.status.XXXX + String status = String.valueOf(log.getStatus().getCode()); + this.counters.inc("metrics.http.status." + status, year, yearMonth, yearWeek, date); + + // metrics.http.os.XXXXX + UserAgentOS os = log.getUserAgent().getOS(); + this.counters.inc("metrics.http.os." + os.toString().toLowerCase(), year, yearMonth, yearWeek, date); + + // metrics.http.browsers.XXXXX + UserAgentBrowser browser = log.getUserAgent().getBrowser(); + this.counters.inc("metrics.http.browsers." + browser.toString().toLowerCase(), year, yearMonth, yearWeek, date); + + // metrics.http.devices.XXXXX = + UserAgentDevice device = log.getUserAgent().getDevice(); + this.counters.inc("metrics.http.devices." + device.toString().toLowerCase(), year, yearMonth, yearWeek, date); // metrics.http.countries.XX = diff --git a/src/fr/devinsy/statoolinfos/uptime/ServiceUptimesFile.java b/src/fr/devinsy/statoolinfos/uptime/ServiceUptimesFile.java index 0fed216..3ec9f17 100644 --- a/src/fr/devinsy/statoolinfos/uptime/ServiceUptimesFile.java +++ b/src/fr/devinsy/statoolinfos/uptime/ServiceUptimesFile.java @@ -88,8 +88,8 @@ public class ServiceUptimesFile * * @param out * the out - * @param organizations - * the organizations + * @param uptimes + * the uptimes * @throws IOException * Signals that an I/O exception has occurred. */