Fix frontend data visualization

This commit is contained in:
Óscar M. Lage 2024-12-05 21:27:19 +01:00
parent 548cb7cb39
commit 3b077f07c1

View File

@ -42,29 +42,32 @@
<div class="container" style="align-items: flex-start; justify-content: <div class="container" style="align-items: flex-start; justify-content:
flex-start"> flex-start">
<section class="mb-8 flex-1"> <section class="mb-8 min-w-0 flex-1 basis-1/3">
<h2 class="text-2xl font-bold text-gray-200 mb-4">Top Commands</h2> <h2 class="text-2xl font-bold text-gray-200 mb-4">Top Commands</h2>
<ul class="list-disc pl-6 space-y-2"> <ul class="list-disc pl-6 space-y-2">
{{range .topCommands}} {{range .topCommands}}
<li class="text-lg text-gray-400">{{.Command}} - <span class="font-semibold text-blue-400">{{.Count}} times</span></li> <li class="text-lg text-gray-400 truncate"><span
class="font-semibold text-blue-400">{{.Count}} times</span> - {{.Command}}</li>
{{end}} {{end}}
</ul> </ul>
</section> </section>
<section class="mb-8 flex-1"> <section class="mb-8 min-w-0 flex-1 basis-1/3">
<h2 class="text-2xl font-bold text-gray-200 mb-4">Tools</h2> <h2 class="text-2xl font-bold text-gray-200 mb-4">Tools</h2>
<ul class="list-disc pl-6 space-y-2"> <ul class="list-disc pl-6 space-y-2">
{{range .categoryStats}} {{range .categoryStats}}
<li class="text-lg text-gray-400">{{.Command}} - <span class="font-semibold text-blue-400">{{.Count}} times</span></li> <li class="text-lg text-gray-400 truncate"><span
class="font-semibold text-blue-400">{{.Count}} times</span> - {{.Command}}</li>
{{end}} {{end}}
</ul> </ul>
</section> </section>
<section class="mb-8 flex-1"> <section class="mb-8 min-w-0 flex-1 basis-1/3">
<h3 class="text-xl font-semibold">Common Patterns</h3> <h2 class="text-2xl font-bold text-gray-200 mb-4">Patterns</h2>
<ul> <ul>
{{range .commonPatternStats}} {{range .commonPatternStats}}
<li class="text-lg text-gray-400">{{.Command}} - <span class="font-semibold text-blue-400">{{.Count}} times</span></li> <li class="text-lg text-gray-400 truncate"><span
class="font-semibold text-blue-400">{{.Count}} times</span> - {{.Command }}</li>
{{end}} {{end}}
</ul> </ul>
<h3 class="text-xl font-semibold mt-8">Pipe Counts</h3> <h3 class="text-xl font-semibold mt-8">Pipe Counts</h3>