Mercurial > code > home > repos > homeauto
annotate service/reasoning/index.html @ 1042:aabb6ef60042
reindent
Ignore-this: e1d8671c92ea28fe8a176d88262e6523
darcs-hash:7c7caabe23b7b2703d9b007401332f59998fdf5b
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 01 Feb 2016 02:34:26 -0800 |
parents | 5fa741cb02a3 |
children | 7a9836d51b0e |
rev | line source |
---|---|
985 | 1 <!DOCTYPE html> |
2 <html> | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
3 <head> |
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
4 <title>reasoning</title> |
985 | 5 <link rel="import" href="https://bigasterisk.com/lib/polymer/0.5.2/core-splitter/core-splitter.html"> |
6 <link rel="import" href="https://bigasterisk.com/supdebug/bang/service-rows/main.html"> | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
7 <style type="text/css" media="all"> |
1042 | 8 /* <![CDATA[ */ |
9 body { | |
10 font-family: sans-serif; | |
11 font-size: 12px; | |
12 } | |
13 pre { | |
14 font-family: sans-serif; | |
15 } | |
16 pre div { | |
17 border-bottom: 1px solid #ccc; | |
18 } | |
19 .pred { | |
20 background: #e7e6f8; | |
21 } | |
22 .obj { | |
23 background: #ccf | |
24 } | |
985 | 25 .pane { |
1042 | 26 position: relative; |
985 | 27 display: flex; |
1042 | 28 flex-direction: column; |
29 } | |
985 | 30 .pane pre { |
31 overflow: auto; | |
32 flex-grow: 1; | |
1042 | 33 } |
34 /* ]]> */ | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
35 </style> |
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
36 |
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
37 </head> |
985 | 38 <body layout vertical fit> |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
39 |
985 | 40 <div style="flex: 0 0 auto"> |
1041
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
41 <service-rows nameSubstrs="reasoning"></service-rows> |
985 | 42 </div> |
43 | |
44 <div class="pane"> | |
45 <h2>Input</h2> | |
46 <pre id="input"/> | |
47 </div> | |
48 | |
49 <core-splitter direction="up"></core-splitter> | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
50 |
985 | 51 <div class="pane"> |
52 <h2>Rules</h2> | |
53 <pre id="rules"/> | |
54 </div> | |
55 | |
56 <core-splitter direction="up"></core-splitter> | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
57 |
985 | 58 <div class="pane"> |
59 <h2>Output</h2> | |
60 <pre id="output"/> | |
61 </div> | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
62 |
985 | 63 <div> |
64 <input id="auto" type="checkbox"/> <label for="auto">auto refresh</label> | |
65 </div> | |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
66 |
937
38a4769595e2
serve 3rdparty js from bigasterisk.com/lib
drewp <drewp@bigasterisk.com>
parents:
852
diff
changeset
|
67 <script src="//bigasterisk.com/lib/jquery-2.0.3.min.js"></script> |
1041
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
68 <script> |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
69 window.NS = { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
70 room: "http://projects.bigasterisk.com/room/", |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
71 dev: "http://projects.bigasterisk.com/device/", |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
72 dcterms: "http://purl.org/dc/terms/", |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
73 rdfs: "http://www.w3.org/2000/01/rdf-schema#", |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
74 map: "http://bigasterisk.com/map#", |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
75 rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
76 }; |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
77 </script> |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
78 <link rel="import" href="/rdf/rdf-uri.html"> |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
79 <script type="text/javascript"> |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
80 // <![CDATA[ |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
81 $(function () { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
82 function update() { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
83 function makeAddStmts(elem) { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
84 return function (stmts) { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
85 elem.empty(); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
86 $.each(stmts, function (i, s) { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
87 elem.append($("<div>").html( |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
88 "<span>"+BigastUri.compactUri(s[0])+"</span> "+ |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
89 "<span class=\"pred\">"+BigastUri.compactUri(s[1])+"</span> "+ |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
90 "<span class=\"obj\">"+BigastUri.compactUri(s[2])+"</span>")); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
91 }) |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
92 } |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
93 } |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
94 |
1041
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
95 $.get("lastInputGraph", makeAddStmts($("#input"))); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
96 $.get("lastOutputGraph", makeAddStmts($("#output"))); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
97 $.get("rules", function (txt) { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
98 $("#rules").empty().text(txt); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
99 }); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
100 } |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
101 function loop() { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
102 update(); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
103 if ($("input#auto").is(":checked")) { |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
104 setTimeout(loop, 2000); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
105 } |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
106 } |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
107 loop(); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
108 $("input#auto").click(loop); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
109 }); |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
110 // ]]> |
5fa741cb02a3
use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents:
985
diff
changeset
|
111 </script> |
825
fc753b24f69a
move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
112 </body> |
937
38a4769595e2
serve 3rdparty js from bigasterisk.com/lib
drewp <drewp@bigasterisk.com>
parents:
852
diff
changeset
|
113 </html> |