mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
added is_master filtering
This commit is contained in:
parent
d39ec4c5d9
commit
17f6a2465e
|
|
@ -83,6 +83,7 @@ permalink: /
|
|||
{% raw %}
|
||||
<script id="template" type="x-tmpl-markup">
|
||||
{{mirrors}}
|
||||
{{if is_master}}
|
||||
<tr class="status-{{status}} row">
|
||||
<td class="col-md-8">
|
||||
<a href="{{if url}}{{url}}{{else}}/{{name}}{{/if}}">{{name}}</a>
|
||||
|
|
@ -93,6 +94,7 @@ permalink: /
|
|||
{{last_update}} {{if show_status}}<span class="label label-status {{label}} hidden-xs">{{status}}</span>{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/mirrors}}
|
||||
</script>
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ window.refreshMirrorList = () => {
|
|||
d['help_url'] = help_url[d['name']];
|
||||
d['is_new'] = new_mirrors[d['name']];
|
||||
d['show_status'] = (d.status != "success");
|
||||
if (d['is_master'] === undefined) {
|
||||
d['is_master'] = true;
|
||||
}
|
||||
// Strip the second component of last_update
|
||||
if (d['last_update_ts']) {
|
||||
let date = new Date(d['last_update_ts'] * 1000);
|
||||
|
|
|
|||
Loading…
Reference in New Issue