-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathconsistencycheck.html
71 lines (71 loc) · 2.55 KB
/
consistencycheck.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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
standardss=[{"uri":"geosparql10","label":"GeoSPARQL 1.0"},{"uri":"geosparql11","label":"GeoSPARQL 1.1"},{"uri":"geosparql12","label":"GeoSPARQL 1.2"},{"uri":"geosparql13","label":"GeoSPARQL 1.3"}]
first=true
</script>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.datatables.net/1.13.11/js/jquery.dataTables.min.js"></script>
</head>
<body>
<h1>GeoSPARQL Standard Consistency Check</h1>
<table><tr><td>Standard: </td><td><select id="standard" onChange="loadStandardFile()"></select></td></tr>
<tr><td>Category: </td><td><select id="category" onChange="loadFiles()"></select></td></tr>
<tr><td>File: </td><td><select id="file" onChange="showResults()"></select></td></tr>
</table>
<table id="resulttable"><thead><th>Function</th><th>Error</th></thead><tbody id="resulttablebody"></tbody>
</table>
<script>
var standarddata={}
var thetable=null
function showResults(){
cat=document.getElementById("category").value
file=document.getElementById("file").value
res=standarddata[cat][file]
reslist=""
for(key in standarddata[cat][file]){
reslist+="<tr><td>"+key+"</td><td>"+standarddata[cat][file][key]+"</td></tr>"
}
document.getElementById("resulttablebody").innerHTML=reslist
if(first){
thetable = $("#resulttable").dataTable({"paging":true});
first=false
}else{
thetable.clear().destroy();
thetable = $("#resulttable").dataTable({"paging":true});
}
}
function loadFiles(){
cat=document.getElementById("category").value
if(cat in standarddata){
files=""
for(fil in standarddata[cat]){
files+="<option value=\""+fil+"\">"+fil+"</option>"
}
document.getElementById("file").innerHTML=files
showResults()
}
}
function loadStandardFile(){
$.getJSON('https://opengeospatial.github.io/ogc-geosparql/'+document.getElementById("standard").value+"/logfile.json", function(jd) {
standarddata=jd
categories=""
for(key in standarddata){
categories+="<option value=\""+key+"\">"+key+"</option>"
}
document.getElementById("category").innerHTML=categories
loadFiles()
});
}
standards=""
for(stand of standardss){
standards+="<option value=\""+stand["uri"]+"\">"+stand["label"]+"</option>"
}
document.getElementById("standard").innerHTML=standards
</script>
</body>
</html>