Files
honeydany/app/templates/threats.html
T

33 lines
1.9 KiB
HTML

{{ define "threats_title" }}Top Threats{{ end }}
{{ define "threats_content" }}
<h1 class="text-2xl font-semibold text-white mb-4">Top Threats</h1>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-700">
<thead class="bg-gray-800">
<tr>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">IP</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Threat Score</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Connections</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Auth Attempts</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Services</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Last Seen</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Blacklisted</th>
</tr>
</thead>
<tbody class="bg-gray-900 divide-y divide-gray-800">
{{ range .Threats }}
<tr>
<td class="px-4 py-2 text-sm text-gray-300">{{ .IP }}</td>
<td class="px-4 py-2 text-sm text-gray-300 font-semibold">{{ .ThreatScore }}</td>
<td class="px-4 py-2 text-sm text-gray-300">{{ .TotalConnections }}</td>
<td class="px-4 py-2 text-sm text-gray-300">{{ .AuthAttempts }}</td>
<td class="px-4 py-2 text-sm text-gray-300">{{ len .Services }}</td>
<td class="px-4 py-2 text-sm text-gray-300">{{ .LastSeen.Format "2006-01-02 15:04:05" }}</td>
<td class="px-4 py-2 text-sm text-gray-300">{{ if .IsBlacklisted }}<span class="text-red-400">Yes</span>{{ else }}No{{ end }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
{{ end }}