annotate service/reasoning/index.html @ 1044:724cb8ea49b4

case check error Ignore-this: 7d175ad43bbf538c1ba32e6ee0b64e2d darcs-hash:bf8630b887e1e2bc4488aa2708c1dc0a3ada04e5
author drewp <drewp@bigasterisk.com>
date Mon, 01 Feb 2016 03:09:08 -0800
parents 5d5106570128
children d7f59d661073
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
1 <!DOCTYPE html>
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
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>
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
5 <script src="/lib/polymer/1.0.9/webcomponentsjs/webcomponents.min.js"></script>
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
6 <link rel="import" href="/lib/polymer/1.0.9/iron-collapse/iron-collapse.html"
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
7 <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
8 <style type="text/css" media="all">
1042
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
9 /* <![CDATA[ */
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
10 body {
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
11 font-family: sans-serif;
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
12 font-size: 12px;
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
13 }
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
14 pre {
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
15 font-family: sans-serif;
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
16 }
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
17 pre div {
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
18 border-bottom: 1px solid #ccc;
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
19 }
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
20 .pred {
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
21 background: #e7e6f8;
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
22 }
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
23 .obj {
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
24 background: #ccf
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
25 }
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
26 .pane {
1042
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
27 position: relative;
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
28 display: flex;
1042
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
29 flex-direction: column;
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
30 }
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
31 .pane pre {
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
32 overflow: auto;
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
33 flex-grow: 1;
1042
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
34 }
aabb6ef60042 reindent
drewp <drewp@bigasterisk.com>
parents: 1041
diff changeset
35 /* ]]> */
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
36 </style>
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
37
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
38 </head>
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
39 <body layout vertical fit>
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
40
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
41 <div style="flex: 0 0 auto">
1041
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
42 <service-rows nameSubstrs="reasoning"></service-rows>
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
43 </div>
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
44
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
45 <div class="pane">
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
46 <h2>Input</h2>
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
47 <div><input id="inputQ"></div>
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
48 <div style="max-height: 600px; margin-right: 30px; overflow: auto">
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
49 <pre id="input"></pre>
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
50 </div>
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
51 </div>
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
52
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
53
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
54 <div class="pane">
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
55 <h2>Rules</h2>
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
56 <div style="max-height: 300px; margin-right: 30px; overflow: auto">
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
57 <pre id="rules"></pre>
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
58 </div>
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
59 </div>
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
60
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
61
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
62 <div class="pane">
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
63 <h2>Output</h2>
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
64 <div><input id="outputQ"></div>
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
65 <div style="max-height: 300px; margin-right: 30px; overflow: auto">
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
66 <pre id="output"></pre>
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
67 </div>
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
68 </div>
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
69
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
70 <div>
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
71 <label><input id="auto" type="checkbox"> auto refresh</label>
985
7e99f05c21cd reasoning index page to html
drewp <drewp@bigasterisk.com>
parents: 937
diff changeset
72 </div>
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
73
937
38a4769595e2 serve 3rdparty js from bigasterisk.com/lib
drewp <drewp@bigasterisk.com>
parents: 852
diff changeset
74 <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
75 <script>
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
76 window.NS = {
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
77 room: "http://projects.bigasterisk.com/room/",
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
78 dev: "http://projects.bigasterisk.com/device/",
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
79 dcterms: "http://purl.org/dc/terms/",
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
80 rdfs: "http://www.w3.org/2000/01/rdf-schema#",
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
81 map: "http://bigasterisk.com/map#",
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
82 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
83 };
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
84 </script>
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
85 <link rel="import" href="/rdf/rdf-uri.html">
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
86 <script type="text/javascript">
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
87 // <![CDATA[
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
88 $(function () {
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
89
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
90 function makeAddStmts(elem, q) {
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
91 return function (stmts) {
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
92 elem.empty();
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
93 $.each(stmts, function (i, stmt) {
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
94 var s = BigastUri.compactUri(stmt[0]);
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
95 var p = BigastUri.compactUri(stmt[1]);
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
96 var o = BigastUri.compactUri(stmt[2]);
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
97
1044
724cb8ea49b4 case check error
drewp <drewp@bigasterisk.com>
parents: 1043
diff changeset
98 q = q.toLowerCase()
724cb8ea49b4 case check error
drewp <drewp@bigasterisk.com>
parents: 1043
diff changeset
99 if (q &&
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
100 s.toLowerCase().indexOf(q) == -1 &&
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
101 p.toLowerCase().indexOf(q) == -1 &&
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
102 o.toLowerCase().indexOf(q) == -1) {
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
103 return;
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
104 }
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
105
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
106 elem.append(
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
107 $("<div>")
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
108 .append($("<span>").text(s))
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
109 .append(" ")
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
110 .append($("<span>").addClass("pred").text(p))
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
111 .append(" ")
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
112 .append($("<span>").addClass("obj").text(o)));
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
113 })
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
114 }
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
115 }
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
116
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
117 function updateIn() {
1044
724cb8ea49b4 case check error
drewp <drewp@bigasterisk.com>
parents: 1043
diff changeset
118 $.get("lastInputGraph", makeAddStmts($("#input"), $("#inputQ").val()));
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
119 }
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
120 function updateOut() {
1044
724cb8ea49b4 case check error
drewp <drewp@bigasterisk.com>
parents: 1043
diff changeset
121 $.get("lastOutputGraph", makeAddStmts($("#output"), $("#outputQ").val()));
724cb8ea49b4 case check error
drewp <drewp@bigasterisk.com>
parents: 1043
diff changeset
122 }
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
123
1041
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
124 function update() {
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
125 updateIn();
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
126 updateOut();
1041
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
127 $.get("rules", function (txt) {
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
128 $("#rules").empty().text(txt);
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
129 });
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
130 }
1043
5d5106570128 style /reasoning/ page
drewp <drewp@bigasterisk.com>
parents: 1042
diff changeset
131 $("#inputQ").on('keyup', updateIn);
1041
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
132 function loop() {
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
133 update();
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
134 if ($("input#auto").is(":checked")) {
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
135 setTimeout(loop, 2000);
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
136 }
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
137 }
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
138 loop();
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
139 $("input#auto").click(loop);
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
140 });
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
141 // ]]>
5fa741cb02a3 use rdf-uri.html for shortening
drewp <drewp@bigasterisk.com>
parents: 985
diff changeset
142 </script>
825
fc753b24f69a move reasoning from /my/proj/room, new integration with magma
drewp <drewp@bigasterisk.com>
parents:
diff changeset
143 </body>
937
38a4769595e2 serve 3rdparty js from bigasterisk.com/lib
drewp <drewp@bigasterisk.com>
parents: 852
diff changeset
144 </html>