This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
541 lines (535 loc) · 26.9 KB
/
index.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="上海大学开源镜像站,致力于为上大校内提供高质量的开源软件镜像、Linux镜像源服务,帮助校内用户更方便地获取开源软件。本镜像站由上海大学开源社区负责维护">
<meta name="keywords" content="镜像站,镜像源,Linux,开源,软件源">
<meta name="author" content="SHUOSC">
<title>上海大学开源镜像站</title>
<!-- <link href="/src/element-ui.css" rel="stylesheet"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui/lib/theme-chalk/index.css">
<link href="/src/mirrors.css" rel="stylesheet">
<link rel="shortcut icon" href="/src/img/favicon.ico">
</head>
<body>
<div id="menu">
<div class="container">
<el-menu :default-active="activeIndex" mode="horizontal">
<div class="title">上海大学开源镜像站</div>
<div class="navBar">
<el-menu-item index="7"><a href="https://osc.shu.edu.cn">Home</a></el-menu-item>
<el-menu-item index="2"><a href="https://mirrornews.shuosc.org">News</a></el-menu-item>
<el-menu-item index="3"><a href="/status.html">Status</a></el-menu-item>
<el-menu-item index="4"><a href="https://help.shuosc.org">Help</a></el-menu-item>
<el-menu-item index="5"><a href="https://mirrornews.shuosc.org/atom.xml">RSS</a></el-menu-item>
<el-menu-item index="6"><a href="/">Mirrors</a></el-menu-item>
</div>
<div class="clear"></div>
</el-menu>
</div>
</div>
<div class="container">
<div class="left">
<div id="proxy-list">
<div class="bar">
<div class="title" v-on:click="changeHidden">加速代理列表
<div class="hidden_button">
<template v-if="hidden">
<i class="el-icon-arrow-right"></i>
</template>
<template v-else>
<i class="el-icon-arrow-down"></i>
</template>
</div>
</div>
<template v-if="!hidden">
<el-table :data="items" style="width: 100%" v-if="isAll">
<el-table-column prop="name" label="镜像名" min-width="25%">
<template scope="scope">
<a v-bind:href="[scope.row.url]">{{scope.row.name}}</a>
</template>
</el-table-column>
<el-table-column prop="origin_url" label="加速源地址" min-width="50%">
<template scope="scope">
<a v-bind:href="[scope.row.sources]" target="_blank">{{scope.row.sources}}</a>
</template>
</el-table-column>
<el-table-column prop="help" label="帮助" min-width="15%">
<template scope="scope">
<a v-if="scope.row.help !== ''" :href="scope.row.help" target="_blank">Help</a>
</template>
</el-table-column>
</el-table>
<el-table :data="items" stripe style="width: 100%" v-else>
<el-table-column prop="name" label="镜像名(加速源地址)" min-width="48%">
<template scope="scope">
<a v-bind:href="[scope.row.url]">{{scope.row.name}}</a>
<a v-bind:href="[scope.row.sources]" target="_blank">({{scope.row.sources}})</a>
</template>
</el-table-column>
<el-table-column prop="help" label="" min-width="5%">
<template scope="scope">
<a v-if="scope.row.help !== ''" :href="scope.row.help" target="_blank"><i class="el-icon-info"></i></a>
</template>
</el-table-column>
</el-table>
</template>
</div>
</div>
<div id="mirrors-list">
<div class="bar">
<div class="title">源列表</div>
<el-input v-model="search" placeholder="输入关键词筛选镜像" class="search"></el-input>
<template>
<el-table :data="searchData" v-loading="loading" style="width: 100%" v-if="isAll">
<el-table-column prop="name" label="镜像名" min-width="35%">
<template scope="scope">
<a v-bind:href="[scope.row.url]">{{scope.row.name}}</a>
<span class="official" v-if="scope.row.official">官方</span>
<span class="new" v-if="scope.row.isNew">新</span>
</template>
</el-table-column>
<el-table-column prop="updateTime" label="最近一次同步完成时间" min-width="25%">
<template scope="scope">
<div v-if="scope.row.updateTime == ''">Unknow</div>
<div v-else>{{scope.row.updateTime}}</div>
</template>
</el-table-column>
<el-table-column prop="taskStatus" label="同步状态" min-width="15%">
<template scope="scope">
<el-tag v-if="scope.row.taskStatus == '1'" type="warning">正在同步</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '0'" type="primary">尚未同步</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '0'" type="success">同步完成</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '1'" type="success">同步完成</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '4'" type="success">同步完成</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '8'" type="success">同步完成</el-tag>
<el-tag v-else type="danger">同步出错</el-tag>
</template>
</el-table-column>
<el-table-column prop="help" label="帮助" min-width="15%">
<template scope="scope">
<a v-if="scope.row.help !== ''" :href="scope.row.help" target="_blank">Help</a>
</template>
</el-table-column>
</el-table>
<el-table :data="searchData" v-loading="loading" stripe style="width: 100%" v-else>
<el-table-column prop="name" label="镜像名" min-width="30%">
<template scope="scope">
<a v-bind:href="[scope.row.url]">{{scope.row.name}}</a>
<span class="official" v-if="scope.row.official">官方</span>
<span class="new" v-if="scope.row.isNew">新</span>
</template>
</el-table-column>
<el-table-column prop="taskStatus" label="同步状态" min-width="18%">
<template scope="scope">
<el-tag v-if="scope.row.taskStatus == '1'" type="warning">正在同步</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '0'" type="primary">尚未同步</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '0'" type="success">同步完成</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '1'" type="success">同步完成</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '4'" type="success">同步完成</el-tag>
<el-tag v-else-if="scope.row.taskStatus == '2'&&scope.row.exitcode == '8'" type="success">同步完成</el-tag>
<el-tag v-else type="danger">同步出错</el-tag>
</template>
</el-table-column>
<el-table-column prop="help" label="" min-width="5%">
<template scope="scope">
<a v-if="scope.row.help !== ''" :href="scope.row.help" target="_blank"><i class="el-icon-info"></i></a>
</template>
</el-table-column>
</el-table>
</template>
</div>
</div>
</div>
<div class="right">
<div id="news">
<div class="container">
<div class="bar">
<div class="title">镜像站通知</div>
<p v-if="isNull" v-cloak>暂无通知</p>
<div v-else id="news-lists">
<p v-for="item in items" v-cloak>
<span class="new" v-if="item.day<3">新</span>
<a :href="item.url" v-text="item.title"><a>
</p>
</div>
</div>
</div>
</div>
<div id="domains">
<div class="container">
<div class="bar">
<div class="title">域名选择</div>
<p v-for="domain in domains"><a :href="domain.url" v-text="domain.url"></a>{{domain.title}}</p>
</div>
</div>
</div>
<div id="isos">
<div class="container">
<div class="bar">
<div class="title">获取发行版</div>
<p>常用Linux发行版ISO和应用软件安装包快捷下载</p>
<el-button type="info" icon="el-icon-download" @click="centerDialogVisible = true">获取下载链接</el-button>
<a type="button" class="el-button el-button--info btn-link" icon="el-icon-download" href="/repos">源快捷配置工具</a>
<el-dialog title="获取发行版" min-width="100%" :visible.sync="centerDialogVisible" width="35%" center modal="true">
<template>
<el-select v-model="linux" placeholder="请选择发行版类型" @change="changeReleases">
<el-option v-for="item in isos" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-select v-model="url" placeholder="请选择版本号" @change="generateUrl">
<el-option v-for="item in releases" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<a v-if="download" :href="url"><el-button type="info" icon="el-icon-download">下载</el-button></a>
</template>
</el-dialog>
</div>
</div>
</div>
<div id="links">
<div class="container">
<div class="bar">
<div class="title">常用链接</div>
<p v-for="link in links"><a :href="link.url" v-text="link.title"></a></p>
<a href='http://ipv6-test.com/validate.php?url=referer'><img src='/src/img/button-ipv6-80x15.png' alt='ipv6 ready' title='ipv6 ready' border='0' /></a>
<a class="github-button" href="https://github.com/shuopensourcecommunity/mirrors.shuosc.org" data-show-count="true" aria-label="Star shuopensourcecommunity/mirrors.shuosc.org on GitHub">Star</a>
<!-- IPv6-test.com widget BEGIN -->
<script type="text/javascript">var _ipv6test_widget_style = {
border: "solid 1px #000",
font_size: "12px",
show_country_flags: true,
show_loading_anim: true,
ipv4_label_color: "#393",
ipv4_background_color: "#eee",
ipv6_label_color: "#339",
ipv6_background_color: "#ddd",
stats_position: "bottom",
stats_font_size: "10px",
stats_color: "#eee",
stats_color_v4: "#beb",
stats_color_v6: "#bbe",
stats_background_color: "#666"
}
</script>
<div id="_ipv6test_widget" style="max-width:30em;display:none">loading <a href="http://ipv6-test.com/">IPv6 connection test</a> ...</div>
</div>
</div>
</div>
<div id="others">
<div class="container">
<div class="bar">
<div class="title">友情链接</div>
<p v-for="link in links"><a :href="link.url" v-text="link.title"></a></p>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="copyright">
<div class="container">
<div class="content">
<p>上海大学开源镜像站是由<a href="http://www.its.shu.edu.cn" target="_blank">上海大学信息化办公室</a>和<a href="http://www.hpcc.shu.edu.cn" target="_blank">上海大学高效能计算中心</a>提供基础设施支持,由<a href="https://nita.shu.edu.cn" target="_blank">上海大学NITA实验室</a>提供服务器支持,由<a href="https://osc.shu.edu.cn" target="_blank">上海大学开源社区</a>负责管理维护。本站所有源均可通过HTTP、FTP和RSYNC方式访问,RSYNC的访问模块名为源的HTTP子目录名。</p>
<p>上海大学开源社区(SHU Open Source Community)是由上海大学的开源技术爱好者于 2010 年自主发起成立的非营利性学生组织。上海大学开源社区的宗旨是:面向全校师生传播开源理念、分享技术知识;为上海大学的开源技术爱好者提供公共服务,建立开放友好的技术交流平台;弘扬自由软件精神,培养自由软件社区文化氛围,为开源事业做出贡献。 </p>
</div>
<div class="logo">上海大学开源社区</div>
<div class="clear"></div>
</div>
</div>
<!-- <script src="/src/vue.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<!-- <script src="/src/element-ui.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/element-ui/lib/index.js"></script>
<!-- <script src="/src/axios.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/axios@0.18.0/dist/axios.min.js"></script>
<script src="/src/mirrors.js"></script>
<script type="text/javascript" src="/src/ip.js?domain=referer" async="async"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113238974-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-113238974-4');
</script>
<script>
var menu = new Vue({
el: '#menu',
data: {
activeIndex: '1'
}
})
var proxy = new Vue({
el: '#proxy-list',
data: {
isAll: true,
loading: true,
items: [],
hidden: true
},
created: function() {
this.loadProxy();
},
methods: {
loadProxy: function () {
axios.get('/data/mirrors.json')
.then(function (response) {
proxy.items = response.data.proxy;
for(item of proxy.items){
if(item.help != ""){
item.help = "https://help.shuosc.org/" + item.help;
}
}
});
var clientWidth = document.documentElement.clientWidth;
if(clientWidth<768){
this.isAll = false;
}
this.loading = false;
},
changeHidden: function () {
if (this.hidden) {
this.hidden = false;
} else {
this.hidden = true;
}
}
}
})
var mirrors = new Vue({
el: '#mirrors-list',
data: {
search: '',
items: [],
isAll: true,
loading: true,
},
created: function() {
this.loadMirrors();
},
methods: {
loadMirrors: function () {
axios.get('/data/mirrors.json')
.then(function (response) {
mirrors.items = response.data.mirrors;
});
axios.get('/data/task_status.json')
.then(function (response) {
for(item of mirrors.items){
var name = item.name;
var data = response.data[name];
var date = new Date();
if(date.getHours()>=2){
item.updateTime = showTime(0)+" 02:00:00";
}else{
item.updateTime = showTime(-1)+" 02:00:00";
}
// if(typeof(data['exitcode'])!= "undefined"){
// item.exitcode = data['exitcode'];
// }
item.taskStatus = "2";
item.exitcode = "0";
// console.log(item);
// if(typeof(data['upstream'])!= "undefined"){
item.sources = data['upstream'];
// }
if(item.help != ""){
item.help = "https://help.shuosc.org/" + item.help;
}
}
});
var clientWidth = document.documentElement.clientWidth;
if(clientWidth<768){
this.isAll = false;
}
this.loading = false;
}
},
computed: {
searchData: function() {
var search = this.search;
var vm = this;
if (search) {
return this.items.filter(function(item) {
return Object.keys(item).some(function(key) {
return String(item[key]).toLowerCase().indexOf(search) > -1
})
})
}
vm.items = vm.items.sort(function(x, y) {
return x.name.localeCompare(y.name);
});
return vm.items;
}
}
})
var isos = new Vue({
el: '#isos',
data: {
selectedOptions: [],
linux: '',
releases: '',
url: '',
download: false,
isos: [],
centerDialogVisible: false
},
created: function() {
this.loadIsos();
},
methods:{
loadIsos: function () {
axios.get('/data/mirrors.json')
.then(function (response) {
isos.isos = response.data.isos;
})
.catch(function (error) {
console.log(error);
});
},
changeReleases: function() {
for(var item of this.isos) {
if(item.value == this.linux){
this.releases = item.children;
}
}
document.getElementsByClassName('el-input__inner')[2].value = '';
this.download = false;
},
generateUrl: function(){
this.download = true;
}
}
})
var news = new Vue({
el: '#news',
data: {
isNull: true,
items: []
},
created: function() {
this.loadNews();
},
methods: {
loadNews: function () {
var vm = this;
axios.get('/recent.json')
.then(function (response) {
if(response.data!==null){
vm.isNull = false;
vm.items = response.data;
for(var item of vm.items){
item.url = "https://mirrornews.shuosc.org/p/"+item.abbrlink+".html";
s1 = new Date(item.date.slice(0,10).replace(/-/g, "/"));
s2 = new Date();
var days = s2.getTime() - s1.getTime();
item.day = parseInt(days / (1000 * 60 * 60 * 24));
}
}
})
.catch(function (error) {
console.log(error);
});
}
}
})
var domains = new Vue({
el: '#domains',
data: {
domains:[{
title: '只解析IPv4',
url: 'https://mirrors.shu.edu.cn'
},{
title: '只解析IPv6',
url: 'https://mirrors6.shu.edu.cn'
},{
title: 'Docker Hub加速IPv4',
url: 'https://docker.mirrors.shu.edu.cn'
},{
title: 'Docker Hub加速IPv6',
url: 'https://docker.mirrors6.shu.edu.cn'
}]
}
})
var links = new Vue({
el: '#links',
data: {
links:[{
title: 'Docker Hub加速 / Speed',
url: '/help/docker.html'
},{
title: '系统状态 / Status',
url: '/status.html'
},{
title: '访问监控 / Visitor',
url: '/visitor/'
},{
title: '镜像通知 / News',
url: 'https://mirrornews.shuosc.org'
},{
title: 'OSC@SHU',
url: 'https://osc.shu.edu.cn'
},{
title: '提交问题或建议',
url: 'https://git.io/shuosc-new'
},{
title: 'SHUhelper',
url: 'https://www.shuhelper.cn'
},{
title: 'Github',
url: 'https://git.io/shuosc'
},{
title: '上大导航 / LINK',
url: 'https://shuer.link'
},{
title: '社区维基 / Wiki',
url: 'https://osc.shu.edu.cn/wiki/'
},{
title: '在线交流 / Telegram',
url: 'https://t.me/joinchat/ErK1eQ6s9-axpVr75Oiwww'
}]
}
})
var others = new Vue({
el: '#others',
data : {
links:[{
title: '清华大学TUNA开源镜像站',
url: 'https://mirrors.tuna.tsinghua.edu.cn'
}, {
title: '中国科学技术大学开源镜像站',
url: 'https://mirrors.ustc.edu.cn'
}, {
title: '上海交通大学开源镜像站',
url: 'https://ftp.sjtu.edu.cn'
}, {
title: '上海科技大学开源镜像站',
url: 'https://mirrors.geekpie.club'
}, {
title: '南京大学开源镜像站',
url: 'https://mirrors.nju.edu.cn'
}, {
title: '浙江大学开源镜像站',
url: 'https://mirrors.zju.edu.cn'
}, {
title: '兰州大学开源镜像站',
url: 'https://mirror.lzu.edu.cn'
}, {
title: '华中科技大学开源镜像站',
url: 'http://mirrors.hust.edu.cn'
}, {
title: '东软信息学院开源镜像站',
url: 'https://mirrors.neusoft.edu.cn/'
}, {
title: '北京理工大学开源镜像站',
url: 'http://mirror.bit.edu.cn'
}]
}
})
</script>
</body>
</html>