56 lines
2.4 KiB
HTML
56 lines
2.4 KiB
HTML
{{define "syb/history_partial"}}
|
|
<div class="modal-body">
|
|
<p class="missing sync-history-load-error" role="alert" data-history-load-error hidden></p>
|
|
<p class="hint">共 {{.SyncHistory.Total}} 条,按发起时间从新到旧排列。</p>
|
|
<div class="table-wrap sync-history-table">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>状态</th><th>日期范围</th><th>操作账号</th><th>开始时间</th>
|
|
<th>完成时间</th><th>同步结果</th><th>覆盖进度</th><th>失败原因</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .SyncHistory.Rows}}
|
|
<tr>
|
|
<td><span class="sync-status {{.StatusClass}}">{{.StatusText}}</span></td>
|
|
<td>{{.DateRange}}</td>
|
|
<td>{{.Username}}</td>
|
|
<td>{{.StartedAt}}</td>
|
|
<td>{{.FinishedAt}}</td>
|
|
<td>{{.Summary}}</td>
|
|
<td>{{.CursorText}}</td>
|
|
<td class="sync-error">{{if .ErrorMessage}}{{.ErrorMessage}}{{else}}—{{end}}</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr class="empty"><td colspan="8">还没有同步记录。</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="modal-foot sync-history-foot">
|
|
<span class="grow"></span>
|
|
<span class="hint sync-history-loading" role="status" data-history-loading hidden>正在加载同步记录…</span>
|
|
<button type="button" data-history-fetch-url="{{.HistoryFetchURL}}">刷新同步记录</button>
|
|
<span class="sync-history-page">第 {{.SyncHistory.Page}} / {{.SyncHistory.TotalPages}} 页</span>
|
|
{{if .HistoryPagination.HasPrev}}
|
|
<a class="button-link" href="{{.HistoryPagination.FirstURL}}"
|
|
data-history-fetch-url="{{.HistoryFetchPagination.FirstURL}}">首页</a>
|
|
<a class="button-link" href="{{.HistoryPagination.PrevURL}}"
|
|
data-history-fetch-url="{{.HistoryFetchPagination.PrevURL}}">上一页</a>
|
|
{{else}}
|
|
<span class="button-link disabled">首页</span><span class="button-link disabled">上一页</span>
|
|
{{end}}
|
|
{{if .HistoryPagination.HasNext}}
|
|
<a class="button-link" href="{{.HistoryPagination.NextURL}}"
|
|
data-history-fetch-url="{{.HistoryFetchPagination.NextURL}}">下一页</a>
|
|
<a class="button-link" href="{{.HistoryPagination.LastURL}}"
|
|
data-history-fetch-url="{{.HistoryFetchPagination.LastURL}}">末页</a>
|
|
{{else}}
|
|
<span class="button-link disabled">下一页</span><span class="button-link disabled">末页</span>
|
|
{{end}}
|
|
<button type="button" data-modal-close>关闭</button>
|
|
</div>
|
|
{{end}}
|