blob: af3220fecfe4f5428abd9d807ec205336e784d35 [file] [log] [blame]
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -07001<!DOCTYPE html>
2<html style="width: 100%; height: 100%;">
3 <head>
4 <title>ASTERIX Demo</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
genia.likes.science@gmail.comd42b4022013-08-09 05:05:23 -07007 <link rel="shortcut icon" type="image/png" href="static/img/hyrax.png">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -07008
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -07009 <!-- Bootstrap & jQuery Styles -->
10 <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
11 <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" type="text/css">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070012
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070013 <!-- Bootstrap Javascript -->
14 <script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places" type="text/javascript"></script>
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070015
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070016 <script src="http://code.jquery.com/jquery.min.js"></script>
17 <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
18 <script src="static/js/bootstrap.min.js"></script>
19 <script src="static/js/geostats.js"></script>
20 <script src="static/js/asterix-sdk-stable.js"></script>
21 <script src="static/js/cherry.js"></script>
22
23 <style type="text/css">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070024
25 #map_canvas img {
26 max-width: none;
27 }
28
29 #legend-holder {
30 background: white;
31 padding: 10px;
32 margin: 10px;
33 text-align: center;
34 }
35
36 #review-handles-dropdown {
genia.likes.science@gmail.com4259a542013-08-18 20:06:58 -070037 padding: 0.5em;
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070038 }
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070039
40 .panel-primary {
41 border-color: #273f93;
42 }
43
44 .panel-primary .panel-heading {
45 color: white;
46 background-color: #273f93;
47 border-color: #273f93;
48 }
49
50 #start-date, #end-date {
51 position: relative; z-index:100;
52 }
53
54 #keyword-textbox, #location-text-box {
55 width: 100%;
56 }
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070057
58 </style>
59 </head>
60 <body style="width: 100%; height: 100%;">
61
62 <!-- Nav -->
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070063 <div class="navbar navbar-default navbar-static-top">
64 <div class="container">
65 <div class="navbar-header">
66 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
67 <span class="icon-bar"></span>
68 <span class="icon-bar"></span>
69 <span class="icon-bar"></span>
70 </button>
71 <a class="navbar-brand" href="#" style="padding: 0.25em;">
72 <img src="static/img/finalasterixlogo.png">
73 </a>
74 </div>
75 <div class="navbar-collapse collapse">
76 <ul class="nav navbar-nav">
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -070077 <li id="about-active"><a id="about-mode" href="#">About</a></li>
78 <li id="explore-active" class="active"><a id="explore-mode" href="#">Explore</a></li>
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070079 <li id="review-active"><a id="review-mode" href="#">Review</a></li>
80 </ul>
81 </div>
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070082 </div>
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070083 </div><!-- /Nav -->
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070084
85 <!-- Search Box -->
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070086 <div class="container">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070087
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070088 <div class="row" id="r1">
89 <div class="col-md-5">
90 <div class="container well" id="explore-well">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -070091
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070092 <!-- Query Builder -->
93 <div class="panel panel-primary">
94 <div class="panel-heading"><h4><b>Query Builder</b></h4></div>
95
96 <!-- List group -->
97 <ul class="list-group">
98
99 <!-- Search Keyword -->
100 <li class="list-group-item">
101 <h4 class="list-group-item-heading">Keyword</h4>
102 <input type="text" id="keyword-textbox" placeholder="Enter a keyword, e.g., verizon">
103 </li>
104
105 <!-- Location -->
106 <li class="list-group-item">
107 <h4 class="list-group-item-heading">Location</h4>
108 <input class="textbox" type="text" id="location-text-box">
109 <div class="btn-group" data-toggle="buttons">
110 <label class="btn btn-default">
111 <input type="radio" id="location-button"> Location
112 </label>
113 <label class="btn btn-default">
114 <input type="radio" id="selection-button"> Selection
115 </label>
116 </div>
117 </li>
118
119 <!-- Date Range -->
120 <li class="list-group-item">
121 <h4 class="list-group-item-heading">Limit Date Range</h4>
122 <input type="text" class="textbox" id="start-date"><span class="badge">Start Date</span><br/>
123 <input type="text" class="textbox" id="end-date"><span class="badge">End Date</span>
124 </li>
125
126 <!-- Results Resolution -->
127 <li class="list-group-item">
128 <h4 class="list-group-item-heading">Result Group Size</h4>
129 <div class="grid-slider" id="grid-lat-slider"></div>
130 <div class="control-label">Latitude: <span id="gridlat">3.0</span></div>
131
132 <div class="grid-slider" id="grid-lng-slider"></div>
133 <div class="control-label">Longitude: <span id="gridlng">3.0</span></div>
134 </li>
135
136 <!-- Submission Buttons -->
137 <li class="list-group-item">
138 <button id="submit-button">Submit</button>
139 <button id="clear-button">Clear</button>
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700140 <button id="show-query-button" style="display: none;">Show Query</button><br/>
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700141 <input type="checkbox" value="Submit Asynchronously" name="async" id="asbox" />
142 Submit asynchronously?
143 </li>
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700144
145 <!-- Div to hold error messages -->
146 <li class="list-group-item">
147 <div id="explore-report-message"></div>
148 </li>
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700149 </ul>
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -0700150 </div>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700151
152 </div>
153
154 <div class="container well" id="review-well" style="display:none;">
155
156 <!-- Tweetbooks -->
157 <div class="panel panel-default">
158 <div class="panel-heading">
159 <h4 class="panel-title">Tweetbooks</h4>
160 </div>
161 <div class="panel-body">
162 <!-- Box to add a new Tweetbook -->
163 <div class="input-group">
164 <input type="text" class="form-control" id="new-tweetbook-entry" placeholder="Name a new tweetbook">
165 <span class="input-group-btn">
166 <button type="button" class="btn" id="new-tweetbook-button">Add</button>
167 </span>
genia.likes.science@gmail.com1400a752013-10-04 04:59:12 -0700168 </div>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700169 <hr/>
170
171 <!-- List to add existing tweetbooks -->
172 <div class="btn-group-vertical" id="review-tweetbook-titles"></div>
173 </div>
174 </div>
175
176 <!-- Background queries -->
177 <div class="panel panel-default">
178 <div class="panel-heading">
179 <h4 class="panel-title">Background Queries</h4>
180 </div>
181 <div class="panel-body">
182 <!-- Add existing background queries to list -->
183 <div class="btn-group-vertical" id="review-tweetbook-titles"></div>
184 <div id="async-handle-controls"></div>
genia.likes.science@gmail.com1400a752013-10-04 04:59:12 -0700185 </div>
186 </div>
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -0700187 </div>
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700188 </div>
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -0700189
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700190 <div class="col-md-7">
191 <div class="container well" id="right-col">
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700192 <div id="map_canvas" style="max-width: 100%; height: auto;"></div>
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700193 </div>
194 </div>
195 </div>
196
197 <!-- Modals and Dialogs -->
198 <div class="row">
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700199
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700200 <!-- On Drilldown, here is a nice modal -->
201 <div class="modal fade" id="drilldown_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
202 <div class="modal-dialog">
203 <div class="modal-content">
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700204 <div class="modal-body" id="drilldown_modal_body">
205
206 <!-- Tweet -->
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700207 <div id="modal-body-tweet" class="well well-sm"></div>
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700208
209 <!-- Existing comments about this tweet -->
210 <!-- Create new comment -->
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700211 <div class="panel panel-default" id="modal-existing-note">
212 <div class="panel-heading">About this Tweetbook</div>
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700213 <div class="panel-body" id="modal-body-notes-holder">
214
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700215 <div class="input-group">
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700216 <input type="text" class="form-control" id="modal-body-tweet-note">
217 <span class="input-group-btn">
218 <button class="btn btn-default" id="modal-body-trash-icon">
219 <span class="glyphicon glyphicon-trash"></span>
220 </button>
221 </span>
222 <span class="badge" id="modal-current-tweetbook"></span>
223 </div>
224
225 </div>
226 </div>
227
228 <!-- Create new comment -->
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700229 <div class="panel panel-default" id="modal-save-tweet-panel">
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700230 <div class="panel-heading">Save to tweetbook</div>
231 <div class="panel-body" id="modal-save-body">
232
233 <div class="input-group">
234 <span class="input-group-addon">Note</span>
235 <input type="text" class="form-control" id="modal-body-add-note" placeholder="Add a note about this tweet">
236 </div>
237
238 <div class="input-group">
239 <span class="input-group-addon">Add to</span>
240 <input type="text" class="form-control" id="modal-body-add-to" placeholder="Add it to a Tweetbook">
241 </div><br/>
242
243 <!-- Comment on tweet to save -->
244 <button type="button" class="btn btn-default" id="save-comment-tweetbook-modal">Save</button>
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700245
246 <div id="modal-body-message-holder"></div>
247
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700248 </div>
249 </div>
250 </div>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700251 <div class="modal-footer">
252 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
253 </div>
254 </div>
255 </div>
256 </div><!-- Modal -->
257
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700258 </div><!-- Row -->
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700259
260 <!-- About Row -->
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700261 <div class="row" id="aboutr" style="display:none;">
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700262 <div class="container">
263 <div id="welcome-message">
264 <p>Welcome to the top-level page of the mysteriously named Black Cherry Demo of AsterixDB. The purpose of this demo is to illustrate how a "cool application" can be built using the JavaScript SDK of AsterixDB and to exercise all of the AsterixDB HTTP APIs. If you are building an app of your own, reading the code for this app is a great way to get acquainted with what you'll need to know.</p>
265
266 <p>In this demo, which is based on spatial analysis of Tweets (it is 2013, afterall), you will see how to formulate aggregate queries and drill-down queries using the query door of the AsterixDB API. You will see how to do this either synchronously or asynchronously (for larger queries whose results may take a while to cook). You will also see how to create and drop datasets (to manage Tweetbooks, notebooks with user commentary on Tweets) and how to perform inserts and deletes (to add/remove Tweetbook entries). Enjoy!</p>
267 </div>
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700268
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700269 </div>
270 </div><!-- /About -->
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700271
272 </div><!-- container -->
273 </body>
274</html>