Jonathan Jenne 248be23804 06-12-2022
2022-12-06 14:08:20 +01:00

30 lines
750 B
Plaintext

@using ECM.JobRunner.Common.JobRunnerReference;
<div class="progress">
<div class="progress-bar"
role="progressbar"
style="width: @getCompletedPercent(jobStatus)%"
aria-label="Job Status in %"
aria-valuenow="@getCompletedPercent(jobStatus)"
aria-valuemin="0"
aria-valuemax="100"
></div>
</div>
@code {
[Parameter]
public StatusItem? jobStatus { get; set; }
protected float getCompletedPercent(StatusItem? entry)
{
if (entry != null && entry.ProgressCurrent > 0 && entry.ProgressTotal > 0)
{
return ((float)entry.ProgressCurrent / (float)entry.ProgressTotal) * 100;
}
else
{
return 0;
}
}
}