Mercurial > code > home > repos > light9
changeset 1309:d5c834766ce9
rdfdb xhtml -> html
Ignore-this: a82386c15ae7789b56b56ac4e8208d28
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Mon, 30 May 2016 22:03:23 +0000 |
parents | 2cb47aa838ee |
children | bda3829270ce |
files | bin/rdfdb light9/rdfdb/web/graphView.html light9/rdfdb/web/graphView.xhtml light9/rdfdb/web/index.html light9/rdfdb/web/index.xhtml |
diffstat | 5 files changed, 102 insertions(+), 110 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/rdfdb Mon May 30 21:52:47 2016 +0000 +++ b/bin/rdfdb Mon May 30 22:03:23 2016 +0000 @@ -399,10 +399,10 @@ self.sendMessage(message) class NoExts(cyclone.web.StaticFileHandler): - # .xhtml pages can be get() without .xhtml on them + # .html pages can be get() without .html on them def get(self, path, *args, **kw): if path and '.' not in path: - path = path + ".xhtml" + path = path + ".html" cyclone.web.StaticFileHandler.get(self, path, *args, **kw) if __name__ == "__main__": @@ -430,7 +430,7 @@ (r'/(.*)', NoExts, {"path" : "light9/rdfdb/web", - "default_filename" : "index.xhtml"}), + "default_filename" : "index.html"}), ], debug=True, db=db)) log.info("serving on %s" % networking.rdfdb.port)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/light9/rdfdb/web/graphView.html Mon May 30 22:03:23 2016 +0000 @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html> + <head> + <title>graphview</title> + <link rel="stylesheet" type="text/css" href="/style.css"> + + </head> + <body> + <!-- + this page is another graph client who maintains the whole + graph all the time + --> + + <div id="status">starting...</div> + + <fieldset> + <legend>Messages</legend> + <div id="out"></div> + </fieldset> + + <p>URI substring: <input type="text" id="uriSubstring"></p> + + <table> + <thead> + <tr> + <th>subject</th> <th>predicate</th> <th>object</th> <th>context</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + + <script type="text/javascript" src="/lib/jquery/dist/jquery.min.js"></script> + <script type="text/javascript" src="/websocket.js"></script> + <script type="text/javascript" src="syncedgraph.js"></script> + <script type="text/javascript"> + $(function(){ + + }); + </script> + </body> +</html>
--- a/light9/rdfdb/web/graphView.xhtml Mon May 30 21:52:47 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" -"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>graphview</title> - <link rel="stylesheet" type="text/css" href="/style.css"/> - - </head> - <body> - <!-- - this page is another graph client who maintains the whole - graph all the time - --> - - <div id="status">starting...</div> - - <fieldset> - <legend>Messages</legend> - <div id="out"></div> - </fieldset> - - <p>URI substring: <input type="text" id="uriSubstring"/></p> - - <table> - <thead> - <tr> - <th>subject</th> <th>predicate</th> <th>object</th> <th>context</th> - </tr> - </thead> - <tbody> - </tbody> - </table> - - <script type="text/javascript" src="/lib/jquery/dist/jquery.min.js"></script> - <script type="text/javascript" src="/websocket.js"></script> - <script type="text/javascript" src="syncedgraph.js"></script> - <script type="text/javascript"> - // <![CDATA[ - $(function(){ - - }); - // ]]> - </script> - </body> -</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/light9/rdfdb/web/index.html Mon May 30 22:03:23 2016 +0000 @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> + <head> + <title>rdfdb</title> + <link rel="stylesheet" type="text/css" href="/style.css"> + </head> + <body> + <h1>rdfdb</h1> + <div id="status">starting...</div> + + <section> + <h2>Edits</h2> + <div id="patches"></div> + </section> + + <p>Clients: <span id="clients"></span></p> + + <fieldset> + <legend>Messages</legend> + <div id="out"></div> + </fieldset> + + <script type="text/javascript" src="/lib/jquery/dist/jquery.min.js"></script> + <script type="text/javascript" src="/websocket.js"></script> + <script type="text/javascript"> + $(function(){ + + function collapseCuries(s) { + // this is temporary. The correct thing is to parse the quad (or receive it as a tree) and then make links to the full URIs and display curies of them + + return s + .replace(/<http:\/\/www.w3.org\/2001\/XMLSchema#(.*?)>/g, function (match, short) { return "xsd:"+short; }) + .replace(/<http:\/\/light9.bigasterisk.com\/(.*?)>/g, function (match, short) { return "light9:"+short; }) + .replace(/<http:\/\/light9.bigasterisk.com\/show\/dance2012\/sessions\/(.*?)>/g, function (match, short) { return "kcsession:"+short }); + } + + function onMessage(d) { + if (d.clients !== undefined) { + $("#clients").empty().text(JSON.stringify(d.clients)); + } + if (d.patch !== undefined) { + $("#patches").prepend( + $("<fieldset>").addClass("patch") + .append($("<legend>").text("Patch")) + .append($("<div>").addClass("deletes").text(collapseCuries(d.patch.deletes))) + .append($("<div>").addClass("adds").text(collapseCuries(d.patch.adds))) + ); + } + + $('#out').append($('<div>').text(JSON.stringify(d))); + } + reconnectingWebSocket("live", onMessage); + }); + </script> + + </body> +</html>
--- a/light9/rdfdb/web/index.xhtml Mon May 30 21:52:47 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="utf8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" -"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>rdfdb</title> - <link rel="stylesheet" type="text/css" href="/style.css"/> - </head> - <body> - <h1>rdfdb</h1> - <div id="status">starting...</div> - - <section> - <h2>Edits</h2> - <div id="patches"></div> - </section> - - <p>Clients: <span id="clients"/></p> - - <fieldset> - <legend>Messages</legend> - <div id="out"></div> - </fieldset> - - <script type="text/javascript" src="/lib/jquery/dist/jquery.min.js"></script> - <script type="text/javascript" src="/websocket.js"></script> - <script type="text/javascript"> - // <![CDATA[ - $(function(){ - - function collapseCuries(s) { - // this is temporary. The correct thing is to parse the quad (or receive it as a tree) and then make links to the full URIs and display curies of them - - return s - .replace(/<http:\/\/www.w3.org\/2001\/XMLSchema#(.*?)>/g, function (match, short) { return "xsd:"+short; }) - .replace(/<http:\/\/light9.bigasterisk.com\/(.*?)>/g, function (match, short) { return "light9:"+short; }) - .replace(/<http:\/\/light9.bigasterisk.com\/show\/dance2012\/sessions\/(.*?)>/g, function (match, short) { return "kcsession:"+short }); - } - - function onMessage(d) { - if (d.clients !== undefined) { - $("#clients").empty().text(JSON.stringify(d.clients)); - } - if (d.patch !== undefined) { - $("#patches").prepend( - $("<fieldset>").addClass("patch") - .append($("<legend>").text("Patch")) - .append($("<div>").addClass("deletes").text(collapseCuries(d.patch.deletes))) - .append($("<div>").addClass("adds").text(collapseCuries(d.patch.adds))) - ); - } - - $('#out').append($('<div>').text(JSON.stringify(d))); - } - reconnectingWebSocket("live", onMessage); - }); - // ]]> - </script> - - </body> -</html>