104 lines
4.0 KiB
HTML
104 lines
4.0 KiB
HTML
<!DOCTYPE>
|
|
<html>
|
|
<head>
|
|
<title>Apache logide raport</title>
|
|
<meta charset="utf-8"/>
|
|
<link href="https://getbootstrap.com/docs/4.1/dist/css/bootstrap.min.css" rel="stylesheet"/>
|
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" crossorigin="anonymous"></script>
|
|
<script src="https://getbootstrap.com/docs/4.1/dist/js/bootstrap.min.js"></script>
|
|
<script type="text/javascript" src="http://kozea.github.com/pygal.js/latest/pygal-tooltips.min.js"></script>
|
|
<style>
|
|
svg, img {
|
|
max-width: 80%;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- Navigeerimise lingid, lehe sees -->
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
|
|
<a class="navbar-brand" href="#">Apache2 logid</a>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav mr-auto">
|
|
<li class="nav-item"><a class="nav-link" href="#home">Üles</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#per_date">Liiklus</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#user_agents">Veebilehitsejad</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#urls">URL-id</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#remote_addrs">IP-aadressid</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#countries">Riigid</a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<div class="row mt-3" id="home">
|
|
<div class="col-md-12">
|
|
<h2>Sisendandmed</h2>
|
|
<p>
|
|
Läbi näritud {{ byte_count | filesizeformat }} andmeid,
|
|
{{ line_count }} rida, {{ event_count }} logikirjet.
|
|
Logikirjed
|
|
{% if first_date == last_date %}
|
|
päeval {{ first_date }}
|
|
{% else %}
|
|
{{ first_date }} kuni {{ last_date }}
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3" id="per_date">
|
|
<div class="col-md-12">
|
|
<h2>Kuupäevad</h2>
|
|
<p>Päringute arv ning päringute maht kuupäevade kaupa grupeeritult,
|
|
ploteeritud <a href="https://matplotlib.org/" target="_blank">matplotlib</a> abil</p>
|
|
<img src="bar.svg"/>
|
|
<h2 id="user_agents">Top 10 veebilehitsejad</h2>
|
|
<p>Interaktiivne graafik ploteeritud <a href="http://pygal.org/en/stable/" target="_blank">pygal</a> abil
|
|
<div>
|
|
{{ user_agent_chart }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3" id="urls">
|
|
<div class="col-md-12">
|
|
<h2>Top 10 URL-id</h2>
|
|
<div>
|
|
<ol>
|
|
{% for path, count in hits_per_path.most_common(10) %}
|
|
<li><a href="http://enos.itcollege.ee{{ path }}" target="_blank">{{ path }}</a>: {{ count }}</li>
|
|
{% endfor %}
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3" id="remote_addrs">
|
|
<div class="col-md-12">
|
|
<h2>Top10 IP aadressid</h2>
|
|
<div>
|
|
<ol>
|
|
{% for remote_addr, count in hits_per_remote_addr.most_common(10) %}
|
|
<li><a href="http://geoiplookup.net/ip/{{ remote_addr }}" target="_blank">{{ remote_addr }}</a>: {{ count }}</li>
|
|
{% endfor %}
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3" id="countries">
|
|
<div class="col-md-12">
|
|
<h2>Külastused riikide kaupa</h2>
|
|
<p>Loetud XML failist, värvitud lxml mooduli abil ning salvestatud top.svg faili sisse:</p>
|
|
<div>
|
|
<img src="top.svg"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3" id="remote_addrs">
|
|
<div class="col-md-12">
|
|
<p>Fail genereeriti {{ datetime.now() }}, võttis aega {{ datetime.now() - then }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|