52 lines
1.6 KiB
HTML
52 lines
1.6 KiB
HTML
<table class="projects" id="project-table">
|
|
<tr class="table-header">
|
|
<th>Name</th>
|
|
<th>Project Site</th>
|
|
<th style="min-width: 8em">
|
|
Last Sync
|
|
<span id="refresh-indicator" style="opacity: 0">Refreshed!</span>
|
|
</th>
|
|
<th style="min-width: 3em">Status</th>
|
|
<th class="project-size">Size</th>
|
|
</tr>
|
|
|
|
{{ $list := slice }}
|
|
{{ range $name, $status := $.Site.Data.sync.projects }}
|
|
{{ $nameLower := lower $name }}
|
|
{{ $list = $list | append (dict "nameLower" $nameLower "name" $name "status" $status) }}
|
|
{{ end }}
|
|
|
|
{{ range sort $list ".nameLower" }}
|
|
<tr>
|
|
<td><a href="/{{ .name }}" style="white-space: nowrap">{{ .name }}</a></td>
|
|
<td><a href="{{ .status.url }}">{{ .status.url_short }}</a></td>
|
|
<td id="last-successful-sync-time-{{ .name }}">
|
|
{{ if .status.upstream }}
|
|
N/A
|
|
{{ else if .status.last_successful_sync_time }}
|
|
{{ time.Format "2006-01-02 15:04:05" (int .status.last_successful_sync_time)}}
|
|
{{ else }}
|
|
Never
|
|
{{ end }}
|
|
|
|
</td>
|
|
<td>
|
|
{{ if .status.is_running }}
|
|
<span class="syncing-badge" id="syncing-badge-{{ .name }}">syncing</span>
|
|
{{ else if (and (not .status.last_sync_success) (not .status.upstream)) }}
|
|
<span class="error-badge" id="error-badge-{{ .name }}">error</span>
|
|
{{ end }}
|
|
</td>
|
|
<td class="project-size">{{ .status.size_human }}</td>
|
|
</tr>
|
|
{{ end }}
|
|
|
|
<tr class="summary">
|
|
<td>Total</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td class="project-size">{{ .Site.Data.sync.total_size_human }}</td>
|
|
</tr>
|
|
</table>
|