summaryrefslogtreecommitdiff
path: root/src/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/index.html')
-rw-r--r--src/templates/index.html22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/templates/index.html b/src/templates/index.html
index d90be7c..e5f602b 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -5,7 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SSH login attempts</title>
<link rel="stylesheet" href="/bootstrap-5.3.3-dist/css/bootstrap.min.css">
- <link rel="stylesheet" href="style.css">
+ <script src="/chartjs/chart.umd.js" defer></script>
+ <script type="module" src="/histogram.js" defer></script>
</head>
<body>
@@ -25,21 +26,26 @@
</div>
<div class="row">
<div class="col">
+ <canvas id="histogram"></canvas>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col">
<h3>Top usernames</h3>
{% with data=top_usernames %}
- {% include 'table.html' %}
+ {% include 'table.html' %}
{% endwith %}
</div>
<div class="col">
<h3>Top passwords</h3>
{% with data=top_passwords %}
- {% include 'table.html' %}
+ {% include 'table.html' %}
{% endwith %}
</div>
<div class="col">
<h3>Latest login attempts</h3>
- {% with data=latest_login_attempts %}
- {% include 'table.html' %}
+ {% with data=latest_login_attempts %}
+ {% include 'table.html' %}
{% endwith %}
</div>
</div>
@@ -48,5 +54,11 @@
as your next password</p>
</div>
+
+<script defer>
+ var data = {{ histogram_data|safe }};
+ var labels = {{ histogram_labels|safe }};
+</script>
+
</body>
</html> \ No newline at end of file