mirror-web/status.html
2020-03-03 01:58:16 +08:00

117 lines
4.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
permalink: /status/
---
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include nav.html %}
<div id="status-page">
<div class="spacing hidden-xs"></div>
<div class="container">
<h3 id="server-status"> # 服务器监控 </h3>
<h4> # 网络流量 </h4>
<div class="row">
{% include status-pic.html name="service_traffic_IPv4" %}
{% include status-pic.html name="service_traffic_IPv6" %}
</div>
<h4># 磁盘状态 </h4>
<div class="row">
<div class="col-md-12"><strong>磁盘占用</strong>: </div>
<div class="col-md-12">
<div class="progress">
<div id="disk-usage-bar" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
</div>
</div>
</div>
{% include status-pic.html name="diskstats_iops" %}
{% include status-pic.html name="diskstats_throughput" %}
</div>
<h4># CPU / 内存</h4>
<div class="row">
{% include status-pic.html name="cpu" %}
{% include status-pic.html name="memory" %}
</div>
<h3 id="syncing-status"># 同步状态</h3>
<table class="table table-condensed flat-md">
<thead class="hidden-xs hidden-sm">
<tr>
<th class="col-xs-12 col-md-2">Name</th>
<th class="col-xs-12 col-md-4" colspan=2>Last Update</th>
<th class="col-xs-12 col-md-4">Upstream</th>
<th class="col-xs-12 col-md-1">Status</th>
<th class="col-xs-12 col-md-1">Size</th>
</tr>
</thead>
<tbody id="mirror-list">
{% raw %}
<tr v-for="mir in rawMirrorList" :class="['row', 'status-'+mir.status, mir.last_ended_ts == mir.last_update_ts ? 'last-succ' : 'last-fail']" :key="mir.name">
<td class="col-xs-4">Name</td>
<td class="col-md-2 col-xs-8">{{mir.name}}{{mir.is_master ? '' : ' [slave]'}}</td>
<td class="col-xs-4">Last Success</td>
<td class="col-xs-8 hidden-md hidden-lg">{{mir.last_update}}, {{mir.last_update_ago}}</td>
<template v-if="mir.last_ended_ts != mir.last_update_ts">
<td class="col-xs-4">Last Attempt</td>
<td class="col-xs-8 hidden-md hidden-lg">{{mir.last_ended}}, {{mir.last_ended_ago}}</td>
</template>
<td class="col-xs-4">Next Sync</td>
<td class="col-xs-8 hidden-md hidden-lg" v-if="mir.status != 'syncing'">{{mir.next_schedule}}, {{mir.next_schedule_ago}}</td>
<td class="col-xs-8 hidden-md hidden-lg" v-else>Syncing Now</td>
<td class="hidden-xs hidden-sm hidden-md hidden-lg"></td>
<td class="col-md-2 col-xs-3 rolling-3 text-left-md text-right-xs hidden-xs hidden-sm">
<div class="tuna-roll" data-tuna-roll-cur="0" data-tuna-roll-max="6">
<template v-if="mir.last_ended_ts == mir.last_update_ts">
<div data-tuna-roll-seq="0 1 2 3">Last Successful Sync</div>
</template>
<template v-else>
<div data-tuna-roll-seq="0">Last Successful Sync</div>
<div data-tuna-roll-seq="1">Last Attempted Sync</div>
<div data-tuna-roll-seq="2">Last Successful Sync</div>
<div data-tuna-roll-seq="3">Last Attempted Sync</div>
</template>
<div data-tuna-roll-seq="4 5">Next Scheduled Sync</div>
</div>
</td>
<td class="hidden-xs hidden-sm hidden-md hidden-lg"></td>
<td class="col-md-2 col-xs-5 rolling-6 hidden-xs hidden-sm">
<div class="tuna-roll" data-tuna-roll-cur="0" data-tuna-roll-max="6">
<template v-if="mir.last_ended_ts == mir.last_update_ts">
<div data-tuna-roll-seq="0 1">{{mir.last_update}}</div>
<div data-tuna-roll-seq="2 3">{{mir.last_update_ago}}</div>
</template>
<template v-else>
<div data-tuna-roll-seq="0">{{mir.last_update}}</div>
<div data-tuna-roll-seq="1" v-if="mir.last_ended_ts != mir.last_update_ts">{{mir.last_ended}}</div>
<div data-tuna-roll-seq="2">{{mir.last_update_ago}}</div>
<div data-tuna-roll-seq="3" v-if="mir.last_ended_ts != mir.last_update_ts">{{mir.last_ended_ago}}</div>
</template>
<template v-if="mir.status == 'syncing'">
<div data-tuna-roll-seq="4 5">Syncing Now</div>
</template>
<template v-else>
<div data-tuna-roll-seq="4">{{mir.next_schedule}}</div>
<div data-tuna-roll-seq="5">{{mir.next_schedule_ago}}</div>
</template>
</div>
</td>
<td class="col-xs-4">Upstream</td>
<td class="col-md-4 col-xs-8">{{mir.upstream}}</td>
<td class="col-xs-4">Status</td>
<td class="col-md-1 col-xs-8">{{mir.status}}</td>
<td class="col-xs-4">Size</td>
<td class="col-md-1 col-xs-8">{{mir.size}}</td>
</tr>
{% endraw %}
</tbody>
</table>
</div><!--/container -->
</div><!--/status -->
{% include footer.html %}
<script src="/static/js/status.js"></script>
<script src="/static/js/index.js"></script>
</body>
</html>
<!--
vim: ts=2 sts=2 sw=2 noexpandtab
-->