(control) Better looking progress bar

This commit is contained in:
Viktor Lofgren 2023-07-11 21:37:32 +02:00
parent 88b9ec70c6
commit 00d9773b44
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ public record ProcessHeartbeat(
String processBase,
String uuid,
double lastSeenMillis,
int progress,
Integer progress,
String status
) {
public boolean isMissing() {
@ -17,7 +17,7 @@ public record ProcessHeartbeat(
public String progressStyle() {
if ("RUNNING".equals(status) && progress > 0) {
return """
background: linear-gradient(90deg, #ccc %d%%, #ccc %d%%, #fff %d%%)
background: linear-gradient(90deg, #fff 0%%, #ccc %d%%, #fff %d%%)
""".formatted(progress, progress, progress);
}
return "";

View File

@ -24,7 +24,7 @@
<td>{{processId}}</td>
<td>{{uuid}}</td>
<td>{{status}}</td>
<td>{{progress}}</td>
<td>{{#if progress}}{{progress}}%{{/if}}</td>
<td>{{#unless isStopped}}{{lastSeenMillis}}{{/unless}}</td>
</tr>
{{/each}}