author | ymh <ymh.work@gmail.com> |
Mon, 31 Oct 2016 14:24:23 +0100 | |
changeset 386 | c731ab9b934d |
child 387 | 7fba86fa8604 |
permissions | -rw-r--r-- |
386
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
@extends('base') |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
@section('css-assets') |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
<link href="{{ asset('/css/vendor/yasqe.min.css')}}" rel='stylesheet' type='text/css'> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
<link href="{{ asset('/css/vendor/yasr.min.css')}}" rel='stylesheet' type='text/css'> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
@parent |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
@endsection |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
|
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
|
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
@section('nav') |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
<ul class="nav navbar-nav"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
<li><a href="{{ route('sparql_form') }}">Client SPARQL</a></li> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
</ul> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
@endsection |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
|
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
@section('js-assets') |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
@parent |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
<script src="{{ asset('/js/vendor/yasqe.bundled.min.js') }}"></script> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
<script src="{{ asset('/js/sparqlclient.js') }}"></script> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
<script> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
$(function() { |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
initSparqlEditor(); |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
// var yasqe = YASQE.fromTextArea($('#query').get(0), { |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
// sparql: { |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
// showQueryButton: false, |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
// //endpoint: "{{ route('sparql_proxy') }}", |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
// //requestMethod: "GET", |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
// //acceptHeaderGraph: "application/rdf+json,/;q=0.9" |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
// //acceptHeaderGraph: "text/turtle,/;q=0.9", |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
// //acceptHeaderSelect: "application/x-turtle,/;q=0.9", |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
// } |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
// }); |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
// // var yasr = YASR($('#results').get(0), { |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
// // getUsedPrefixes: yasqe.getPrefixesFromQuery, |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
// // useGoogleCharts: false, |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
36 |
// // outputPlugins: ["table", "error", "boolean", "rawResponse", "pivot"], |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
37 |
// // }); |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
38 |
// // yasqe.options.sparql.callbacks.complete = yasr.setResponse; |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
39 |
}); |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
40 |
</script> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
41 |
@endsection |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
42 |
|
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
43 |
@section('content') |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
44 |
<div class="row"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
45 |
<div class="col-md-12"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
46 |
<form action="{{ route('sparql_query') }}" method="get" id="query-form"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
47 |
<fieldset> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
48 |
<div class="form-group row"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
49 |
<div class="col-md-12"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
50 |
<label for="query">Requête</label><br /> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
51 |
<textarea rows="18" cols="80" name="query" id="query" class="form-control">select distinct ?Concept where {[] a ?Concept} LIMIT 100</textarea> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
52 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
53 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
54 |
<div class="row"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
55 |
<div class="form-group col-md-2"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
56 |
<label for="format" class="n control-label">Format du résultat</label> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
57 |
<select name="format" id="format" class="form-control"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
58 |
<option value="text/html" selected="selected">HTML</option> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
59 |
</select> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
60 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
61 |
<div class="form-group col-md-2"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
62 |
<label for="timeout" class="n control-label">Timeout</label> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
63 |
<input name="timeout" id="timeout" class="form-control" type="text" value="0" /> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
64 |
<span class=" help-block"> milliseconds <i>(values less than 1000 are ignored)</i></span> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
65 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
66 |
<div class="form-group col-md-2"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
67 |
<label for="limit" class="n control-label">Limite</label> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
68 |
<div class="input-group"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
69 |
<input name="limit" id="limit" class="form-control" type="text" value="0" /> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
70 |
<div class="input-group-btn"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
71 |
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span></button> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
72 |
<ul id="limits-choices" class="dropdown-menu dropdown-menu-right"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
73 |
<li><a href="#">0</a></li> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
74 |
<li><a href="#">100</a></li> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
75 |
<li><a href="#">200</a></li> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
76 |
<li><a href="#">500</a></li> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
77 |
</ul> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
78 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
79 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
80 |
<span class=" help-block"> résultats/pages <i>(0 = tous sur une seule page)</i></span> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
81 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
82 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
83 |
<div class="form-group row"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
84 |
<div class="col-md-12"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
85 |
<input id="submit-query-form" type="submit" class="btn btn-primary" value="Lancer la requête"/> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
86 |
<input type="reset" class="btn" value="URL de la requête" id="get-query-url"/> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
87 |
<input type="reset" class="btn" value="Nouvelle requête" id="reset-query"/> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
88 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
89 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
90 |
</fieldset> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
91 |
</form> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
93 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
94 |
|
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
95 |
<div class="row"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
96 |
<div id="results" class="col-md-12"> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
97 |
</div> |
c731ab9b934d
implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
98 |
@endsection |