Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

web: added generated files into the repository.

  • Loading branch information...
commit f7d847891dd17b2aa6ff94d0e9af0a31d32162ce 1 parent 6e0a8f8
Aram Hăvărneanu authored bmizerany committed
View
3  .gitignore
@@ -5,9 +5,6 @@
*.out
*.prof
.roundup.*
-*.css.go
-*.html.go
-*.js.go
doc/*.html
doc/*.[0-9]
peer/version.go
View
5 web/main.css.go
@@ -0,0 +1,5 @@
+package web
+
+// This file was generated from main.css.
+
+var main_css string = "body {\n color: #333;\n font-family: monospace;\n}\n\n#info {\n background: #ccc;\n padding: .2em .4em;\n margin: 0 0 1em;\n -webkit-border-radius: .4em;\n border-radius: .4em;\n}\n\n.error #info {\n background: #d88;\n}\n\n.msg {\n display: none;\n background: #ee8;\n -webkit-border-radius: .4em;\n border-radius: .4em;\n padding: 0 .3em;\n}\n\n.waiting #waiting.msg, .wereback #wereback.msg {\n display: inline;\n}\n\na {\n color: #35e;\n cursor: pointer;\n font-weight: bold;\n text-decoration: underline;\n}\n\n#tree {\n opacity: .5;\n}\n\n.open #tree {\n opacity: 1;\n}\n\ndl {\n margin: 0 0 0 .5em;\n padding: 0;\n}\n\ndt {\n font-weight: bold;\n margin: 0;\n padding: 0;\n}\n\ndd {\n margin: 0 0 .5em;\n padding: 0 0 0 1em;\n}\n\ntable {\n border-spacing: 0;\n}\n\ntr {\n -webkit-transition-property: background;\n -webkit-transition-duration: 350ms;\n -webkit-transition-timing-function: ease-in-out;\n -moz-transition-property: background;\n -moz-transition-duration: 350ms;\n -moz-transition-timing-function: ease-in-out;\n transition-property: background;\n transition-duration: 350ms;\n transition-timing-function: ease-in-out;\n}\n\ntr.new {\n background: #f7f787;\n}\n\nth {\n font-weight: normal;\n margin: 0;\n padding: 0 .5em;\n text-align: left;\n}\n\ntd.eq:after {\n content: \"=\";\n}\n\ntd {\n margin: 0;\n padding: 0 .5em;\n}\n\ntd.rev {\n color: #aaa;\n text-align: right;\n}\n\ntd.body {\n}\n"
View
5 web/main.html.go
@@ -0,0 +1,5 @@
+package web
+
+// This file was generated from main.html.
+
+var main_html string = "<html>\n <head>\n <title>{{ .Name }} {{ .Path }} doozer viewer</title>\n <link rel=stylesheet href=/$main.css>\n </head>\n\n <body class=loading>\n <div id=info>\n <span id=status>loading</span>\n <span id=waiting class=msg>\n <span id=retrymsg></span>\n <a id=trynow>[Try now]</a>\n </span>\n <span id=wereback class=msg>...and, we're back!</span>\n </div>\n\n <dl id=tree>\n <dt>{{ .Path }}</dt>\n <dd id=root>\n <dl></dl>\n <table><tbody></table>\n </dd>\n </dl>\n\n <script>\n var path = \"{{ .Path }}\";\n </script>\n <script src=/$main.js></script>\n <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\" async defer onload=$(document).ready(dr) onerror=jerr()></script>\n </body>\n</html>\n"
View
5 web/main.js.go
@@ -0,0 +1,5 @@
+package web
+
+// This file was generated from main.js.
+
+var main_js string = "var deadline = 0, retry_interval = 0;\nvar ti;\n\nfunction insert(parent, child) {\n var existing = parent.children();\n var before = null;\n existing.each(function () {\n var jq = $(this);\n if (jq.attr('name') < child.attr('name')) {\n before = jq;\n }\n });\n if (before === null) {\n parent.prepend(child);\n } else {\n before.after(child);\n }\n}\n\nfunction apply(ev) {\n var parts = ev.Path.split(\"/\")\n if (parts.length < 2) {\n return\n }\n parts = parts.slice(1); // omit leading empty string\n var dir_parts = parts.slice(0, parts.length - 1);\n var dir = $('#root');\n for (var i = 0; i < dir_parts.length; i++) {\n var part = dir_parts[i];\n var next = dir.find('> dl > div[name=\"'+part+'\"] > dd');\n if (next.length < 1) {\n var div = $('<div>').attr('name', part);\n var dd = $('<dd>');\n div.append($('<dt>').text(part+'/')).append(dd);\n insert(dir.children('dl'), div);\n dd.append('<dl>').append('<table><tbody>');\n next = dd;\n }\n dir = next;\n }\n\n var basename = parts[parts.length - 1];\n var entry = dir.find('tr[name=\"'+basename+'\"]');\n if (entry.length < 1) {\n var tr = $('<tr class=new>').attr('name', basename);\n insert(dir.children('table').children('tbody'), tr);\n tr.append($('<th>').text(basename)).\n append('<td class=rev>').\n append('<td class=eq>').\n append('<td class=body>');\n entry = tr;\n }\n entry.children('td.rev').text('('+ev.Rev+')');\n entry.children('td.body').text(ev.Body);\n entry.addClass('new');\n\n // Kick off the transition in a bit.\n setTimeout(function() { entry.removeClass('new') }, 550);\n}\n\nfunction time_interval(s) {\n if (s < 120) return Math.ceil(s) + 's';\n if (s < 7200) return Math.round(s/60) + 'm';\n return Math.round(s/3600) + 'h';\n}\n\nfunction countdown() {\n var body = $('body');\n var eta = (deadline - new Date().getTime())/1000;\n if (eta < 0) {\n body.removeClass('waiting');\n open();\n } else {\n $('#retrymsg').text(\"retrying in \" + time_interval(eta));\n body.addClass('waiting');\n ti = setTimeout(countdown, Math.max(100, eta*9));\n }\n}\n\nfunction retry() {\n deadline = ((new Date()).getTime()) + retry_interval * 1000;\n retry_interval += (retry_interval + 5) * (Math.random() + .5);\n countdown();\n}\n\nfunction open() {\n var body = $('body');\n var status = $('#status');\n status.text(\"connecting\");\n var ws = new WebSocket(\"ws://\"+location.host+\"/$events\"+path);\n ws.onmessage = function (ev) {\n var jev = JSON.parse(ev.data);\n apply(jev);\n };\n ws.onopen = function(ev) {\n if (retry_interval > 0) {\n body.addClass('wereback');\n setTimeout(function () { body.removeClass('wereback') }, 8000);\n }\n retry_interval = 0;\n status.text('open')\n body.addClass('open').removeClass('loading closed error');\n $('#root > dl > *, #root > table > tbody > *').remove();\n };\n ws.onclose = function(ev) {\n status.text('closed')\n body.addClass('closed').removeClass('loading open error wereback');\n retry();\n };\n ws.onerror = function(ev) {\n status.text('error ' + ev)\n body.addClass('error').removeClass('loading open closed wereback');\n retry();\n };\n}\n\nfunction dr() {\n $('#trynow').click(function() {\n clearTimeout(ti);\n deadline = 0;\n countdown();\n });\n\n if (\"WebSocket\" in window) {\n open();\n } else {\n $('#status').text(\"your browser does not provide websockets\");\n $('body').addClass('error nows').removeClass('loading open closed wereback');\n }\n}\n\nfunction jerr() {\n const m = 'could not load jquery (is your network link down?)';\n document.getElementById('status').innerText = m;\n document.getElementsByTagName('body')[0].className = 'error';\n}\n"
View
5 web/stats.html.go
@@ -0,0 +1,5 @@
+package web
+
+// This file was generated from stats.html.
+
+var stats_html string = "<html>\n <body>\n <table>\n <tr>\n <th>\n <th>Alloc\n <th>TotalAlloc\n </tr>\n <tr>\n <td>\n <td>{Alloc}\n <td>{TotalAlloc}\n </tr>\n </table>\n </body>\n</html>\n"
Please sign in to comment.
Something went wrong with that request. Please try again.