update
This commit is contained in:
24
internal/handler/templates/pages/ingest-jobs.html
Normal file
24
internal/handler/templates/pages/ingest-jobs.html
Normal file
@ -0,0 +1,24 @@
|
||||
{{define "title"}}入库任务 · 管理后台{{end}}
|
||||
{{define "barLabel"}}管理后台 · 爬虫入库任务{{end}}
|
||||
{{define "barRight"}}<a href="/admin/logout">退出</a>{{end}}
|
||||
{{define "content"}}
|
||||
{{template "bar" .}}
|
||||
<div class="main">
|
||||
<h1>爬虫入库任务</h1>
|
||||
<p class="muted">worker 每 3 秒扫描一次 pending 任务并处理;failed 可一键重新入队。共 {{.Total}} 条,当前第 {{.Page}} / {{if eq .TotalPages 0}}1{{else}}{{.TotalPages}}{{end}} 页(每页 {{.PageSize}} 条)。</p>
|
||||
<table>
|
||||
<thead><tr><th>ID</th><th>状态</th><th>重试</th><th>错误信息</th><th>更新时间</th><th>操作</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Jobs}}<tr>
|
||||
<td><code>{{.ID}}</code></td>
|
||||
<td><span class="badge {{.Status}}">{{.Status}}</span></td>
|
||||
<td>{{.Attempts}}</td>
|
||||
<td class="err break">{{.LastError}}</td>
|
||||
<td class="muted">{{.UpdatedAt}}</td>
|
||||
<td>{{if eq .Status "failed"}}<form class="retry" method="post" action="/admin/ingest-jobs/{{.ID}}/retry"><button class="retry" type="submit">重试</button></form>{{else}}<span class="muted">—</span>{{end}}</td>
|
||||
</tr>{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{template "pager" .Pager}}
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user