Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

web UI

  • Loading branch information...
commit 848f8cd93e2a608cb5434e2e7491fdd8b02125d3 1 parent 8a2962c
@ray1919 authored
View
76 log/development.log
@@ -3,3 +3,79 @@
[Wed Apr 11 15:40:52 2012] [debug] GET /query/pernicious (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
[Wed Apr 11 15:40:52 2012] [debug] Dispatching callback.
[Wed Apr 11 15:40:53 2012] [debug] 200 OK (0.195499s, 5.115/s).
+[Fri Apr 13 11:19:00 2012] [info] Server listening (http://*:3000)
+[Fri Apr 13 11:19:02 2012] [debug] Your secret passphrase needs to be changed!!!
+[Fri Apr 13 11:19:02 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:02 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:19:02 2012] [debug] Template "appLayout.html.ep" not found.
+[Fri Apr 13 11:19:02 2012] [debug] Template "not_found.development.html.ep" not found.
+[Fri Apr 13 11:19:02 2012] [debug] Template "not_found.html.ep" not found.
+[Fri Apr 13 11:19:02 2012] [debug] Rendering inline template.
+[Fri Apr 13 11:19:02 2012] [debug] 404 Not Found (0.014735s, 67.866/s).
+[Fri Apr 13 11:19:02 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:02 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:03 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:19:03 2012] [debug] Template "appLayout.html.ep" not found.
+[Fri Apr 13 11:19:03 2012] [debug] Template "not_found.development.html.ep" not found.
+[Fri Apr 13 11:19:03 2012] [debug] Template "not_found.html.ep" not found.
+[Fri Apr 13 11:19:03 2012] [debug] 404 Not Found (0.006045s, 165.426/s).
+[Fri Apr 13 11:19:55 2012] [info] Server listening (http://*:3000)
+[Fri Apr 13 11:19:56 2012] [debug] Your secret passphrase needs to be changed!!!
+[Fri Apr 13 11:19:56 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:56 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:19:56 2012] [debug] Rendering template "query.html.ep".
+[Fri Apr 13 11:19:56 2012] [debug] 200 OK (0.007136s, 140.135/s).
+[Fri Apr 13 11:19:56 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:57 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:57 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:19:57 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:19:57 2012] [debug] 200 OK (0.001361s, 734.754/s).
+[Fri Apr 13 11:20:00 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:20:00 2012] [debug] GET /query/junior,senior (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:20:00 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:20:01 2012] [debug] 200 OK (0.283378s, 3.529/s).
+[Fri Apr 13 11:20:03 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:20:03 2012] [debug] GET /query/junior,senior (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:20:03 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:20:03 2012] [debug] 200 OK (0.019238s, 51.980/s).
+[Fri Apr 13 11:20:07 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:20:07 2012] [debug] GET /query/junior,senior,GRE (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:20:07 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:20:07 2012] [debug] 200 OK (0.025917s, 38.585/s).
+[Fri Apr 13 11:20:11 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:20:11 2012] [debug] GET /query/junior,senior,GRE (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:20:11 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:20:11 2012] [debug] 200 OK (0.020306s, 49.247/s).
+[Fri Apr 13 11:22:08 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:22:08 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:22:08 2012] [debug] 200 OK (0.001473s, 678.887/s).
+[Fri Apr 13 11:22:08 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:22:08 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:22:08 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:22:08 2012] [debug] 200 OK (0.001479s, 676.133/s).
+[Fri Apr 13 11:22:12 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:22:12 2012] [debug] GET /query/junior,senior (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:22:12 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:22:12 2012] [debug] 200 OK (0.019567s, 51.106/s).
+[Fri Apr 13 11:22:16 2012] [debug] Bad signed cookie "mojolicious", possible hacking attempt.
+[Fri Apr 13 11:22:16 2012] [debug] GET /query/junior (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19).
+[Fri Apr 13 11:22:16 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:22:16 2012] [debug] 200 OK (0.012216s, 81.860/s).
+[Fri Apr 13 11:23:03 2012] [debug] GET / (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1).
+[Fri Apr 13 11:23:03 2012] [debug] 200 OK (0.001615s, 619.195/s).
+[Fri Apr 13 11:23:13 2012] [debug] GET /query/junior (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1).
+[Fri Apr 13 11:23:13 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:23:13 2012] [debug] 200 OK (0.011581s, 86.348/s).
+[Fri Apr 13 11:23:16 2012] [debug] GET /query/junior,senior (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1).
+[Fri Apr 13 11:23:16 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:23:16 2012] [debug] 200 OK (0.020940s, 47.755/s).
+[Fri Apr 13 11:23:19 2012] [debug] GET /query/junior,senior,TOEFL,GRE (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1).
+[Fri Apr 13 11:23:19 2012] [debug] Dispatching callback.
+[Fri Apr 13 11:23:19 2012] [debug] 200 OK (0.025193s, 39.694/s).
View
42 public/css/demo.css
@@ -0,0 +1,42 @@
+* {
+ outline: none !important;
+}
+
+body {
+ margin: 0;
+ padding: 2em;
+ font-family: Lucida Sans,Lucida Grande,Arial !important;
+ font-size: 13px !important;
+ background: white;
+ color: #333;
+}
+
+#textbox {
+ float: left;
+}
+
+#checkbox {
+}
+
+button {
+ -webkit-transition: background-color 0.2s linear;
+ border-radius:4px;
+ -moz-border-radius: 4px 4px 4px 4px;
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
+ background-color: #E4F2FF;
+ background-image: url("http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/form/images/button.png");
+ background-position: center top;
+ background-repeat: repeat-x;
+ border: 1px solid #769DC0;
+ padding: 2px 8px 4px;
+ font-size:1em;
+}
+
+button:hover {
+ background-color: #AFD9FF;
+ color: #000000;
+}
+
+h1 {
+ font-size:1.5em;
+}
View
23 public/css/style.css
@@ -0,0 +1,23 @@
+/* Any demo specific styling needed for this tutorial only */
+html, body {
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+}
+
+#appLayout {
+ height: 100%;
+}
+#leftCol {
+ width: 14em;
+}
+
+.claro .demoLayout .edgePanel {
+ background-color: #d0e9fc;
+}
+
+#viewsChart {
+ width: 550px;
+ height: 550px;
+}
View
2  query.pl
@@ -2,7 +2,7 @@
use lib 'lib';
use Words;
-get '/' => 'appLayout';
+get '/' => 'query';
get '/query/:word' => sub {
my $self = shift;
View
73 templates/query.html.ep
@@ -0,0 +1,73 @@
+<html>
+ <head>
+ <title>Word Library</title>
+ <link rel="stylesheet" href="css/demo.css">
+ <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/claro.css" />
+ <link rel="stylesheet" href="css/demo.css">
+ <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js" data-dojo-config="async: true"></script>
+ <script>
+ require(["dojo/on", "dojo/dom", "dijit/registry", "dojo/_base/xhr", "dijit/form/SimpleTextarea", "dijit/form/CheckBox", "dijit/form/Button", "dojo/domReady!"], function(on, dom, registry, xhr, SimpleTextarea, CheckBox, Button) {
+
+ var textarea = new SimpleTextarea({
+ rows: 7,
+ cols: 50,
+ selectOnClick: true,
+ value: "<Input words here>"
+ }, "textarea");
+ textarea.startup();
+
+ var myLibs = new Array("junior","senior","CET-4","CET-6","TOEFL","IELTS","GRE");
+ var libLabel = new Array("Junior middle school", "Senior middle school", "CET-4", "CET-6", "TOEFL", "IELTS", "GRE");
+ for (elm in myLibs) {
+ document.getElementById(myLibs[elm]).innerHTML = libLabel[elm];
+ var checkbox = new CheckBox({
+ id: myLibs[elm],
+ value: myLibs[elm]
+ });
+ checkbox.placeAt(myLibs[elm],"first");
+ }
+
+ var button = new Button({
+ id: "btn1",
+ label: "Do it!",
+ onClick: function(){
+ var qLibs = new Array;
+ for (elm in myLibs) {
+ if (registry.byId(myLibs[elm]).get("value")) {
+ qLibs.push(registry.byId(myLibs[elm]).get("value"));
+ }
+ }
+ console.log(qLibs.join());
+ xhr.get({
+ url: "query/" + qLibs.join(),
+ load: function(newContent) {
+ dom.byId("return").innerHTML = newContent;
+ },
+ error: function() {
+ dom.byId("return").innerHTML = "Try it again!";
+ }
+ });
+ }
+ }, "btn");
+ button.startup();
+
+ });
+ </script>
+ </head>
+<body class="claro">
+ <h2>Query Words in Word Library</h2>
+ <div id="textbox">
+ <textarea id="textarea"></textarea><br>
+ <button id="btn" align="right"></button>
+ <p id="return"></p>
+ </div>
+ <div id="checkbox">
+ <label id="junior"></label><br>
+ <label id="senior"></label><br>
+ <label id="CET-4"></label><br>
+ <label id="CET-6"></label><br>
+ <label id="TOEFL"></label><br>
+ <label id="IELTS"></label><br>
+ <label id="GRE"></label><br>
+ </div>
+</body>
Please sign in to comment.
Something went wrong with that request. Please try again.