redux of the worker queue
This commit is contained in:
@@ -365,6 +365,35 @@ pub fn dashboard() -> Html {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
// Work Queue Progress
|
||||
if let Some(ref wq) = s.work_queue {
|
||||
if wq.download.pending + wq.download.running + wq.tag.pending + wq.tag.running + wq.organize.pending + wq.organize.running > 0
|
||||
|| wq.download.completed + wq.tag.completed + wq.organize.completed > 0
|
||||
{
|
||||
<div class="card">
|
||||
<h3>{ "Pipeline Progress" }</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>{ "Step" }</th><th>{ "Pending" }</th><th>{ "Running" }</th><th>{ "Done" }</th><th>{ "Failed" }</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{ for [("Download", &wq.download), ("Index", &wq.index), ("Tag", &wq.tag), ("Organize", &wq.organize)].iter().map(|(name, c)| {
|
||||
html! {
|
||||
<tr>
|
||||
<td>{ name }</td>
|
||||
<td>{ c.pending }</td>
|
||||
<td>{ if c.running > 0 { html! { <span class="badge badge-accent">{ c.running }</span> } } else { html! { { "0" } } } }</td>
|
||||
<td>{ c.completed }</td>
|
||||
<td>{ if c.failed > 0 { html! { <span class="badge badge-danger">{ c.failed }</span> } } else { html! { { "0" } } } }</td>
|
||||
</tr>
|
||||
}
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
// Background Tasks (always show if there are tasks or scheduled items)
|
||||
if !s.tasks.is_empty() || has_scheduled {
|
||||
<div class="card">
|
||||
|
||||
Reference in New Issue
Block a user