fixed preload resumption
This commit is contained in:
parent
304135be2e
commit
caf12d9ca5
5 changed files with 49 additions and 5 deletions
|
|
@ -61,6 +61,7 @@ type file struct {
|
|||
Anchor string
|
||||
Status int
|
||||
Prio int
|
||||
Errc int
|
||||
Running bool
|
||||
}
|
||||
|
||||
|
|
@ -138,6 +139,7 @@ func getPreloads(path string, fs *fs.FS) (dc dirContents) {
|
|||
URI: template.HTML(p.Name),
|
||||
Status: p.Status,
|
||||
Prio: p.Prio,
|
||||
Errc: p.Errc,
|
||||
Running: p.Running,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ td {
|
|||
.green {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
.status-red {
|
||||
color: #e74c3c;
|
||||
}
|
||||
.status-yellow {
|
||||
color: #f39c12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,17 @@ Quota: {{.QuotaCur}} / {{.QuotaMax}} GiB
|
|||
<tr class="listitem">
|
||||
<td class="listpath"><a href="{{$s.URI}}">{{$s.Name}}</a></td>
|
||||
<td class="listoptions">
|
||||
{{if ge $s.Status 0}}<span>{{$s.Status}}%</span>{{end}}<span class="status-{{if $s.Running}}green">[running{{else}}yellow">[queued{{end}}]</span><span>{{$s.Prio}}</span><a href="{{$s.URI}}?o=v">[v]</a><a href="{{$s.Name}}?o=s&r=preloads">[s]</a><a href="{{$s.Name}}?o=i&r=preloads">[+]</a><a href="{{$s.Name}}?o=d&r=preloads">[-]</a>
|
||||
{{if ge $s.Status 0}}<span>{{$s.Status}}%</span>{{end}}
|
||||
{{if $s.Running -}}
|
||||
<span class="status-green">[running]</span>
|
||||
{{else -}}
|
||||
{{if ge $s.Errc 10 -}}
|
||||
<span class="status-red">[error]</span>
|
||||
{{else -}}
|
||||
<span class="status-yellow">[queued]</span>
|
||||
{{end -}}
|
||||
{{end -}}
|
||||
<span>{{$s.Prio}}</span><a href="{{$s.URI}}?o=v">[v]</a><a href="{{$s.Name}}?o=s&r=preloads">[s]</a><a href="{{$s.Name}}?o=i&r=preloads">[+]</a><a href="{{$s.Name}}?o=d&r=preloads">[-]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="spacer"><td colspan="2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue