30 lines
750 B
Plaintext
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;
|
|
}
|
|
}
|
|
}
|