-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
113 lines (95 loc) · 3.08 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
<!doctype html>
<html>
<head>
<meta name="description" content="Mine Versions">
<style>
body {
font-family: sans-serif;
color: #333;
}
.note {
background:#eee; border-left:solid 3px cornflowerblue;
padding: 1em;
border-radius: 2px;
margin-top: 0.5em;
}
.note pre {
display: inline
}
.failed {
background: rgba(150, 0, 50, 0.1);
padding: 1em;
border-left: solid 3px firebrick;
}
main {
display: flex;
flex-grow: 1;
justify-content: space-around;
flex-wrap: wrap;
}
table {
margin: 1em;
}
table tr:nth-child(even) {
background-color: rgba(0, 0, 0, 0.05);
color: #111
}
td {
padding: 0.1em 2em
}
a {
color: #222;
}
a:hover {
background-color: rgba(255, 255, 0, 0.1)
}
a:visited {
color: rgb(80, 0, 80)
}
table a {
display: block;
}
h1 {text-align:center; background-color:#447; color: #fff; padding:0.5em}
</style>
</head>
<body>
<h1>InterMine version checker</h1>
<main>
<table>
<th>Mine</th>
<th>InterMine Version</th>
<th>API Version</th>
<tbody id="mineList"></tbody>
</table>
<div class="statuses">
<div class="note failed"> Failed to load:
<ul id="poorlymines"></ul>
</div>
<div class="note">Note: Mines prior to 1.6.6 had no <pre>/version/intermine</pre> method and consequently return the <pre>/version</pre> default method instead.</div>
<div class="note">To add or remove a mine, add it to to the mines array here: <a href="https://github.com/intermine/mineversions/">https://github.com/intermine/mineversions/</a></div>
</div>
</main>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script>
$.ajax("http://registry.intermine.org/service/instances?mines=all").done(function (intermines) {
var mines = intermines.instances
var display = document.getElementById("mineList");
var errors = document.getElementById("poorlymines");
mines.map(function(mine) {
var mineName = mine.name,
mineLink = mine.url,
mineUrl = mineLink + "/service";
$.ajax(mineUrl + "/version/intermine").done(function(response) {
display.innerHTML += "<tr><td><a href='" + mineLink + "'>" + mineName +
"</a></td><td>" + response +
"</td><td>" + mine.api_version +
"</td></tr>";
}).fail(function(response) {
errors.innerHTML += "<li><a href='" + mineLink + "'>" + mineName +
":</a> " + response.statusText + "</li>";
});
});
});
</script>
</body>
</html>