This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
forked from NYIST-CIPS/mirror-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
status.html
157 lines (157 loc) · 6.95 KB
/
status.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
permalink: /status/
---
<!DOCTYPE html>
<html>
{% capture metaDesc %}镜像站监控,包括网络流量、磁盘状态、磁盘占用和 CPU 与内存的使用情况,以及各个镜像的同步状态{% endcapture %}
{% include head.html metaDesc=metaDesc notArticle=true %}
<body>
{% include nav.html %}
<div id="status-page">
{% unless site.issue %}
<div class="spacing hidden-xs"></div>
<div class="container">
{% unless site.hide_server_status %}
<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" id="disk-usage">{% raw %}
<div class="col-xs-12" v-if="diskUsages.length"><strong>磁盘占用</strong>: </div>
<template v-for="disk in diskUsages">
<div class="col-xs-1" v-if="disk.desc">{{ disk.desc }}</div>
<div :class="['col-xs-' + (disk.desc ? '11' : '12')]">
<div class="progress">
<div class="progress-bar" role="progressbar" :aria-valuenow="disk.percentage" aria-valuemin="0" aria-valuemax="100" :style="{width: disk.percentage + '%'}">
<strong>{{ disk.used }} / {{ disk.total }}</strong>
</div>
</div>
</div>
</template>{% endraw %}
{% 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>
{% endunless %}
<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" data-tuna-roll-cur="-1" data-tuna-roll-max="6">
{% 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 v-if="dateTooltip" class="tuna-roll">
<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 1">Last Successful Sync</div>
<div data-tuna-roll-seq="2 3">Last Attempted Sync</div>
</template>
<div v-if="mir.status == 'syncing'" data-tuna-roll-seq="4 5">Sync Started</div>
<div v-else data-tuna-roll-seq="4 5">Next Scheduled Sync</div>
</div>
<div v-else class="tuna-roll">
<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 v-if="dateTooltip" class="tuna-roll">
<template v-if="mir.last_ended_ts == mir.last_update_ts">
<div data-tuna-roll-seq="0 1 2 3">{{mir.last_update_ago}}
<div class="tooltiptext">{{mir.last_update}}</div>
</div>
</template>
<template v-else>
<div data-tuna-roll-seq="0 1">{{mir.last_update_ago}}
<div class="tooltiptext">{{mir.last_update}}</div>
</div>
<div data-tuna-roll-seq="2 3" v-if="mir.last_ended_ts != mir.last_update_ts">{{mir.last_ended_ago}}
<div class="tooltiptext">{{mir.last_ended}}</div>
</div>
</template>
<div v-if="mir.status == 'syncing'" data-tuna-roll-seq="4 5">{{mir.last_started_ago}}
<div class="tooltiptext">{{mir.last_started}}</div>
</div>
<div v-else data-tuna-roll-seq="4 5">{{mir.next_schedule_ago}}
<div class="tooltiptext">{{mir.next_schedule}}</div>
</div>
</div>
<div v-else class="tuna-roll">
<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 -->
{% endunless %}
</div><!--/status -->
{% include footer.html %}
<script src="/static/js/status.js?{{ site.data['hash'] }}"></script>
<script src="/static/js/index.js?{{ site.data['hash'] }}"></script>
</body>
</html>
<!--
vim: ts=2 sts=2 sw=2 noexpandtab
-->