added is_master filtering

This commit is contained in:
bigeagle 2016-05-06 10:19:59 +08:00
parent d39ec4c5d9
commit 17f6a2465e
No known key found for this signature in database
GPG Key ID: 9171A4571C27920A
2 changed files with 5 additions and 0 deletions

View File

@ -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 %}

View File

@ -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);