ui: make numbers nicer

This commit is contained in:
2023-03-17 12:30:04 +01:00
parent 9554588381
commit 4ebf03e96d
4 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<td>{{outcome.fileInfo.name}}</td>
</tr><tr>
<td>Size: </td>
<td>{{outcome.fileInfo.size}} bytes</td>
<td>{{outcome.fileInfo.size|prettynumber}} bytes</td>
</tr><tr>
<td>Type: </td>
<td>{{outcome.fileInfo.ident}}</td>
+1 -1
View File
@@ -12,7 +12,7 @@
<li class="nav-item" role="presentation">
<button class="nav-link " id="match-tab-{{match.idx}}" data-bs-toggle="tab" data-bs-target="#match-{{match.idx}}"
type="button" role="tab" aria-controls="match-tab-{{match.idx}}" aria-selected="true">
{{match.idx}}: {{match.fileOffset}}
{{match.idx}}: {{match.fileOffset|prettynumber}}
</button>
</li>
{% endfor %}
+1 -1
View File
@@ -26,7 +26,7 @@
</a>
{% endif %}
</td>
<td>{{outcome.fileInfo.size}}</td>
<td>{{outcome.fileInfo.size|prettynumber}}</td>
<td style="white-space:nowrap;">{{outcome.fileInfo.ident}}</td>
<td>{{outcome.matches|length}}</td>
+5 -1
View File
@@ -272,4 +272,8 @@ def hex_filter(s):
@views.app_template_filter('mydate')
def date_filter(s):
return s.strftime('%Y-%m-%d %H:%M:%S')
return s.strftime('%Y-%m-%d %H:%M:%S')
@views.app_template_filter('prettynumber')
def date_filter(s):
return f"{s:,}"