Fixed wording between visitors and humans.

This commit is contained in:
Christian P. MOMON 2021-06-26 16:17:17 +02:00
parent 26d5d5cd22
commit 5b1ce71dd8
12 changed files with 107 additions and 80 deletions

View file

@ -331,12 +331,15 @@ public class ChartHtmlizer
{
Year current = dataset.getOldestTimestamp();
if (current != null)
{
if ((startTarget == null) || (current.isBefore(startTarget)))
{
startTarget = current;
}
}
}
}
else
{
startTarget = start;
@ -409,12 +412,15 @@ public class ChartHtmlizer
{
YearMonth current = dataset.getOldestTimestamp();
if (current != null)
{
if ((startTarget == null) || (current.isBefore(startTarget)))
{
startTarget = current;
}
}
}
}
else
{
startTarget = start;
@ -487,12 +493,15 @@ public class ChartHtmlizer
{
YearWeek current = dataset.getOldestTimestamp();
if (current != null)
{
if ((startTarget == null) || (current.isBefore(startTarget)))
{
startTarget = current;
}
}
}
}
else
{
startTarget = start;

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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)

View file

@ -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();

View file

@ -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();

View file

@ -15,9 +15,9 @@
<div id="metricZone">
<div id="metricMenuView" />
<div id="charts" style="display: block;">
<div id="http.hits.visitors" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.humans" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visitors.humans" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visits.visitors" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visits.humans" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
</div>
</div>
</body>

View file

@ -22,9 +22,13 @@
<div id="http.hits.ipv4" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.ipv6" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<br/>
<div id="http.hits-visitorsbots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.visitors" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits-humansbots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.humans" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.bots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<br/>
<div id="http.hits.humans-ipv4ipv6" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.humans.ipv4" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.hits.humans.ipv6" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<h2>http.errors</h2>
<div id="http.errors" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
@ -42,8 +46,8 @@
<div id="http.ip.ipv4" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.ip.ipv6" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<br/>
<div id="http.ip-visitorsbots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.ip.visitors" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.ip-humansbots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.ip.humans" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.ip.bots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<h2>http.visitors</h2>
@ -60,8 +64,8 @@
<h2>http.visits</h2>
<div id="http.visits" style="width: 450px; height: 300px; border: 1px solid #e7e7e7;"/>
<div id="http.visits-visitorsbots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visits.visitors" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visits-humansbots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visits.humans" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
<div id="http.visits.bots" style="width: 450px; height: 300px; display: inline-block; border: 1px solid #e7e7e7;"/>
</div>
</div>

View file

@ -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 =

View file

@ -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.
*/