blob: d6fb3b88496b2b408fc2d6d42a340a7b01c6722b [file] [log] [blame]
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -07001<!DOCTYPE html>
2<html style="width: 100%; height: 100%;">
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -07003<head>
4 <title>ASTERIX Demo</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -07006
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -07007 <link rel="shortcut icon" type="image/png" href="static/img/hyrax.png">
genia.likes.science@gmail.com6d6aa8e2013-07-23 01:23:21 -07008
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -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
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070013 <!-- Bootstrap Javascript -->
Eugenia Gabrielovaf29a55f2013-10-28 03:18:18 -070014 <script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places,drawing,geometry" type="text/javascript"></script>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070015
16 <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/asterix-sdk-stable.js"></script>
20 <script src="static/js/rainbowvis.js"></script>
zheilbronbebb2202014-03-28 14:36:52 -070021 <script src="static/js/tweetbook.js"></script>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070022
23 <style type="text/css">
24
25 .tab-content {
26 clear: none;
27 }
28
29 #map_canvas img {
30 max-width: none;
31 }
32
33 .panel-primary {
34 border-color: #273f93;
35 }
36
37 .panel-primary .panel-heading {
38 color: white;
39 background-color: #273f93;
40 border-color: #273f93;
41 }
42
43 #start-date, #end-date {
44 position: relative; z-index:100;
45 }
46
47 #keyword-textbox, #location-text-box {
48 width: 100%;
49 }
50 </style>
51</head>
52<body style="width: 100%; height: 100%;">
53
54 <!-- Nav -->
55 <div class="navbar navbar-default navbar-static-top">
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070056 <div class="container">
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070057 <div class="navbar-header">
58 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
59 <span class="icon-bar"></span>
60 <span class="icon-bar"></span>
61 <span class="icon-bar"></span>
62 </button>
63 <a class="navbar-brand" href="#" style="padding: 0.25em;">
64 <img src="static/img/finalasterixlogo.png">
65 </a>
66 </div>
67 <div class="navbar-collapse collapse">
68 <ul class="nav navbar-nav" id="mode-tabs">
69 <li id="about-active"><a data-toggle="tab" id="about-mode" href="#about-tab">About</a></li>
70 <li id="explore-active" class="active"><a data-toggle="tab" id="explore-mode" href="#demo-tab">Explore</a></li>
71 <li id="review-active"><a data-toggle="tab" id="review-mode" href="#demo-tab">Review</a></li>
72 </ul>
73 </div>
74 </div>
75 </div><!-- /Nav -->
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -070076
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070077 <div class="tab-content">
78
79 <!-- Begin About Tab -->
80 <div class="tab-pane" id="about-tab">
81 <div class="container">
82 <!-- Welcome Message -->
83 <div class="row">
zheilbronbebb2202014-03-28 14:36:52 -070084 <p>Welcome to the top-level page of the Tweetbook 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>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070085
zheilbronbebb2202014-03-28 14:36:52 -070086 <p>In this demo, which is based on spatial analysis of Tweets, 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). Let's walk through the demo.</p>
Eugenia Gabrielovae11965b2013-10-29 19:07:42 -070087 </div>
88
89 <hr/>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070090
Eugenia Gabrielovae11965b2013-10-29 19:07:42 -070091 <!-- Tutorial Part 1: Overview -->
92 <div style="margin-bottom: 2em; text-align: center;">
93 <img src="static/img/Tutorial1.png" style="max-width:100%;">
94 </div><hr/>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -070095
Eugenia Gabrielovae11965b2013-10-29 19:07:42 -070096 <!-- Tutorial Part 2: Location Search -->
97 <div style="margin-bottom: 2em; text-align: center;">
98 <img src="static/img/Tutorial2.png" style="max-width:100%;">
99 </div><hr/>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700100
Eugenia Gabrielovae11965b2013-10-29 19:07:42 -0700101 <!-- Tutorial Part 3: Search Results, Drilling Down, Saving Comments -->
102 <div style="margin-bottom: 2em; text-align: center;">
103 <img src="static/img/Tutorial3.png" style="max-width:100%;">
104 </div><hr/>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700105
Eugenia Gabrielovae11965b2013-10-29 19:07:42 -0700106 <!-- Tutorial Part 4: Review Mode -->
107 <div style="margin-bottom: 2em; text-align: center;">
108 <img src="static/img/Tutorial4.png" style="max-width:100%;">
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700109 </div>
110 </div>
111 </div><!-- End About Tab -->
112
113 <!-- Begin Main Demo Tab -->
114 <div class="tab-pane active" id="demo-tab">
115 <div class="container">
116 <div class="row">
117 <!-- Left Column -->
118 <div class="col-md-5">
119
120 <!-- Explore Mode: Query Builder Column -->
121 <div class="container well" id="explore-well">
122
123 <!-- Query Builder -->
124 <div class="panel panel-primary">
125 <div class="panel-heading"><h4><b>Query Builder</b></h4></div>
126 <ul class="list-group">
127
128 <!-- Search Keyword -->
129 <li class="list-group-item">
130 <h4 class="list-group-item-heading">Keyword</h4>
131 <input type="text" id="keyword-textbox" placeholder="Enter a keyword, e.g., verizon">
132 </li>
133
134 <!-- Location -->
135 <li class="list-group-item">
136 <h4 class="list-group-item-heading">Location</h4>
137 <input class="textbox" type="text" id="location-text-box">
138 <div class="btn-group" data-toggle="buttons">
Eugenia Gabrielovaea8f9482013-10-28 04:49:18 -0700139 <label id="location-label" class="btn btn-default">
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700140 <input type="radio" id="location-button"> Location
141 </label>
Eugenia Gabrielovaea8f9482013-10-28 04:49:18 -0700142 <label id="selection-label" class="btn btn-default">
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700143 <input type="radio" id="selection-button"> Selection
144 </label>
145 </div>
146 </li>
147
148 <!-- Date Range -->
149 <li class="list-group-item">
150 <h4 class="list-group-item-heading">Limit Date Range</h4>
151 <input type="text" class="textbox" id="start-date"><span class="badge">Start Date</span><br/>
152 <input type="text" class="textbox" id="end-date"><span class="badge">End Date</span>
153 </li>
154
155 <!-- Results Resolution -->
156 <li class="list-group-item">
157 <h4 class="list-group-item-heading">Result Group Size</h4>
158
159 <div class="grid-slider" id="grid-lat-slider"></div>
160 <div class="control-label">Latitude: <span id="gridlat">3.0</span></div>
161
162 <div class="grid-slider" id="grid-lng-slider"></div>
163 <div class="control-label">Longitude: <span id="gridlng">3.0</span></div>
164 </li>
165
166 <!-- Submission Buttons -->
167 <li class="list-group-item">
168 <button class="btn btn-primary" type="button" id="submit-button">Submit</button>
Eugenia Gabrielovae11965b2013-10-29 19:07:42 -0700169 <button class="btn btn-primary" type="button" id="clear-button">Clear</button><br/>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700170 <input type="checkbox" value="Submit Asynchronously" name="async" id="asbox" />
171 Submit asynchronously?
172 </li>
173 </ul>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700174 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700175 </div><!-- End Query Build Column -->
176
177 <!-- Review Mode: Tweetbooks and Async Query Review Column -->
178 <div class="container well" id="review-well" style="display:none;">
179 <div class="panel panel-default">
180 <div class="panel-heading">
181 <h4 class="panel-title">Tweetbooks</h4>
genia.likes.science@gmail.com1400a752013-10-04 04:59:12 -0700182 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700183 <div class="panel-body">
184 <!-- Box to add a new Tweetbook -->
185 <div class="input-group">
186 <input type="text" class="form-control" id="new-tweetbook-entry" placeholder="Name a new tweetbook">
187 <span class="input-group-btn">
188 <button type="button" class="btn" id="new-tweetbook-button">Add</button>
189 </span>
190 </div>
191 <hr/>
192
193 <!-- List to add existing tweetbooks -->
194 <div class="btn-group-vertical" id="review-tweetbook-titles"></div>
195 </div>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700196 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700197
198 <!-- Background queries -->
199 <div class="panel panel-default">
200 <div class="panel-heading">
201 <h4 class="panel-title">Background Queries</h4>
202 </div>
203 <div class="panel-body">
204 <!-- Add existing background queries to list -->
205 <div class="btn-group-vertical" id="review-tweetbook-titles"></div>
206 <div id="async-handle-controls"></div>
207 </div>
208 </div>
209 </div><!-- end Review Mode Column -->
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700210
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700211 <!-- Container to hold success/error messages -->
212 <div id="report-message"></div>
213 </div><!-- End Left Column -->
214
215 <!-- Right column holds map & legend -->
216 <div class="col-md-7">
Eugenia Gabrielova8b34c652013-10-19 06:53:27 -0700217 <!-- Map Container -->
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700218 <div class="container well" id="right-col">
Eugenia Gabrielovad07556a2013-10-11 03:45:06 -0700219 <div id="map_canvas" style="max-width: 100%; height: auto;"></div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700220 </div>
221
Eugenia Gabrielova8b34c652013-10-19 06:53:27 -0700222 <!-- Legend Container -->
Eugenia Gabrielovad6e88e02013-10-19 08:26:54 -0700223 <div id="rainbow-legend-container" class="container well" style="display:none;">
Eugenia Gabrielovad6e88e02013-10-19 08:26:54 -0700224 <div class="row">
Zachary Heilbrona16fb6f2014-03-10 13:53:54 -0700225 <div class="col-md-4 col-md-offset-4" style="text-align: center;"># Tweets</div>
Eugenia Gabrielovad6e88e02013-10-19 08:26:54 -0700226 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700227
Eugenia Gabrielovad6e88e02013-10-19 08:26:54 -0700228 <div class="row">
Zachary Heilbrona16fb6f2014-03-10 13:53:54 -0700229 <div id="legend-min" class="col-md-2 col-md-offset-1" style="text-align:right;"></div>
Eugenia Gabrielovad6e88e02013-10-19 08:26:54 -0700230 <div id="legend-gradient" class="col-md-5" style="text-align: center;"></div>
231 <div id="legend-max" class="col-md-2"></div>
Eugenia Gabrielova8b34c652013-10-19 06:53:27 -0700232 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700233 </div><!-- End Legend Container -->
234 </div><!-- End Right Column -->
235 </div><!-- End Row -->
236
237 <!-- Tweetbook Comment Container -->
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700238 <div class="modal fade" id="drilldown_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700239 <div class="modal-dialog">
240 <div class="modal-content">
241 <div class="modal-body" id="drilldown_modal_body">
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700242
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700243 <!-- Tweet -->
244 <div id="modal-body-tweet" class="well well-sm"></div>
245
246 <!-- Existing comments about this tweet -->
247 <!-- Create new comment -->
248 <div class="panel panel-default" id="modal-existing-note">
249 <div class="panel-heading">About this Tweetbook</div>
250 <div class="panel-body" id="modal-body-notes-holder">
251
252 <div class="input-group">
253 <input type="text" class="form-control" id="modal-body-tweet-note">
254 <span class="input-group-btn">
255 <button class="btn btn-default" id="modal-body-trash-icon">
256 <span class="glyphicon glyphicon-trash"></span>
257 </button>
258 </span>
259 <span class="badge" id="modal-current-tweetbook"></span>
genia.likes.science@gmail.com0f67d9e2013-10-04 17:08:50 -0700260 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700261
262 </div>
263 </div>
264
265 <!-- Create new comment -->
266 <div class="panel panel-default" id="modal-save-tweet-panel">
267 <div class="panel-heading">Save to tweetbook</div>
268 <div class="panel-body" id="modal-save-body">
269
270 <div class="input-group">
271 <span class="input-group-addon">Note</span>
272 <input type="text" class="form-control" id="modal-body-add-note" placeholder="Add a note about this tweet">
273 </div>
274
275 <div class="input-group">
276 <span class="input-group-addon">Add to</span>
277 <input type="text" class="form-control" id="modal-body-add-to" placeholder="Add it to a Tweetbook">
278 </div><br/>
279
280 <!-- Comment on tweet to save -->
281 <button type="button" class="btn btn-default" id="save-comment-tweetbook-modal">Save</button>
282
283 <div id="modal-body-message-holder"></div>
284
285 </div>
286 </div>
287 </div>
288 <div class="modal-footer">
289 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700290 </div>
291 </div>
genia.likes.science@gmail.com2de4c182013-10-04 11:39:11 -0700292 </div>
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700293 </div><!-- Modal -->
294 </div><!-- End Container -->
295 </div><!-- End Main Demo Tab -->
genia.likes.science@gmail.com724476d2013-10-04 03:31:16 -0700296
Eugenia Gabrielovaab1ae552013-10-20 01:12:19 -0700297 </div><!-- End tab list -->
298</body>
Eugenia Gabrielovaf29a55f2013-10-28 03:18:18 -0700299</html>