genia.likes.science@gmail.com | 6d6aa8e | 2013-07-23 01:23:21 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html style="width: 100%; height: 100%;"> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 3 | <head> |
| 4 | <title>ASTERIX Demo</title> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
genia.likes.science@gmail.com | 6d6aa8e | 2013-07-23 01:23:21 -0700 | [diff] [blame] | 6 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 7 | <link rel="shortcut icon" type="image/png" href="static/img/hyrax.png"> |
genia.likes.science@gmail.com | 6d6aa8e | 2013-07-23 01:23:21 -0700 | [diff] [blame] | 8 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 9 | <!-- 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.com | 6d6aa8e | 2013-07-23 01:23:21 -0700 | [diff] [blame] | 12 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 13 | <!-- Bootstrap Javascript --> |
Eugenia Gabrielova | f29a55f | 2013-10-28 03:18:18 -0700 | [diff] [blame] | 14 | <script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places,drawing,geometry" type="text/javascript"></script> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 15 | |
| 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> |
| 21 | <script src="static/js/cherry.js"></script> |
| 22 | |
| 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.com | 724476d | 2013-10-04 03:31:16 -0700 | [diff] [blame] | 56 | <div class="container"> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 57 | <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.com | 724476d | 2013-10-04 03:31:16 -0700 | [diff] [blame] | 76 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 77 | <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"> |
| 84 | <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> |
| 85 | |
| 86 | <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). Let's walk through the demo.</p> |
| 87 | |
| 88 | <hr/> |
| 89 | |
| 90 | <div style="margin-bottom: 2em; text-align: center;"> |
| 91 | <img src="static/img/Tutorial1.png" style="max-width:100%;"> |
| 92 | </div><hr/> |
| 93 | |
| 94 | <!-- Tutorial Part 2: Location Search --> |
| 95 | <div style="margin-bottom: 2em; text-align: center;"> |
| 96 | <img src="static/img/Tutorial2.png" style="max-width:100%;"> |
| 97 | </div><hr/> |
| 98 | |
| 99 | <!-- Tutorial Part 3: Search Results, Drilling Down, Saving Comments --> |
| 100 | <div style="margin-bottom: 2em; text-align: center;"> |
| 101 | <img src="static/img/Tutorial3.png" style="max-width:100%;"> |
| 102 | </div><hr/> |
| 103 | |
| 104 | <!-- Tutorial Part 4: Review Mode --> |
| 105 | <div style="margin-bottom: 2em; text-align: center;"> |
| 106 | <img src="static/img/Tutorial4.png" style="max-width:100%;"> |
genia.likes.science@gmail.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 107 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 108 | </div> |
| 109 | </div> |
| 110 | </div><!-- End About Tab --> |
| 111 | |
| 112 | <!-- Begin Main Demo Tab --> |
| 113 | <div class="tab-pane active" id="demo-tab"> |
| 114 | <div class="container"> |
| 115 | <div class="row"> |
| 116 | <!-- Left Column --> |
| 117 | <div class="col-md-5"> |
| 118 | |
| 119 | <!-- Explore Mode: Query Builder Column --> |
| 120 | <div class="container well" id="explore-well"> |
| 121 | |
| 122 | <!-- Query Builder --> |
| 123 | <div class="panel panel-primary"> |
| 124 | <div class="panel-heading"><h4><b>Query Builder</b></h4></div> |
| 125 | <ul class="list-group"> |
| 126 | |
| 127 | <!-- Search Keyword --> |
| 128 | <li class="list-group-item"> |
| 129 | <h4 class="list-group-item-heading">Keyword</h4> |
| 130 | <input type="text" id="keyword-textbox" placeholder="Enter a keyword, e.g., verizon"> |
| 131 | </li> |
| 132 | |
| 133 | <!-- Location --> |
| 134 | <li class="list-group-item"> |
| 135 | <h4 class="list-group-item-heading">Location</h4> |
| 136 | <input class="textbox" type="text" id="location-text-box"> |
| 137 | <div class="btn-group" data-toggle="buttons"> |
Eugenia Gabrielova | ea8f948 | 2013-10-28 04:49:18 -0700 | [diff] [blame^] | 138 | <label id="location-label" class="btn btn-default"> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 139 | <input type="radio" id="location-button"> Location |
| 140 | </label> |
Eugenia Gabrielova | ea8f948 | 2013-10-28 04:49:18 -0700 | [diff] [blame^] | 141 | <label id="selection-label" class="btn btn-default"> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 142 | <input type="radio" id="selection-button"> Selection |
| 143 | </label> |
| 144 | </div> |
| 145 | </li> |
| 146 | |
| 147 | <!-- Date Range --> |
| 148 | <li class="list-group-item"> |
| 149 | <h4 class="list-group-item-heading">Limit Date Range</h4> |
| 150 | <input type="text" class="textbox" id="start-date"><span class="badge">Start Date</span><br/> |
| 151 | <input type="text" class="textbox" id="end-date"><span class="badge">End Date</span> |
| 152 | </li> |
| 153 | |
| 154 | <!-- Results Resolution --> |
| 155 | <li class="list-group-item"> |
| 156 | <h4 class="list-group-item-heading">Result Group Size</h4> |
| 157 | |
| 158 | <div class="grid-slider" id="grid-lat-slider"></div> |
| 159 | <div class="control-label">Latitude: <span id="gridlat">3.0</span></div> |
| 160 | |
| 161 | <div class="grid-slider" id="grid-lng-slider"></div> |
| 162 | <div class="control-label">Longitude: <span id="gridlng">3.0</span></div> |
| 163 | </li> |
| 164 | |
| 165 | <!-- Submission Buttons --> |
| 166 | <li class="list-group-item"> |
| 167 | <button class="btn btn-primary" type="button" id="submit-button">Submit</button> |
| 168 | <button class="btn btn-primary" type="button" id="clear-button">Clear</button> |
| 169 | <button class="btn btn-primary" type="button" id="show-query-button">Show Query</button><br/> |
| 170 | <input type="checkbox" value="Submit Asynchronously" name="async" id="asbox" /> |
| 171 | Submit asynchronously? |
| 172 | </li> |
| 173 | </ul> |
genia.likes.science@gmail.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 174 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 175 | </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.com | 1400a75 | 2013-10-04 04:59:12 -0700 | [diff] [blame] | 182 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 183 | <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.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 196 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 197 | |
| 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.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 210 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 211 | <!-- 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 Gabrielova | 8b34c65 | 2013-10-19 06:53:27 -0700 | [diff] [blame] | 217 | <!-- Map Container --> |
genia.likes.science@gmail.com | 724476d | 2013-10-04 03:31:16 -0700 | [diff] [blame] | 218 | <div class="container well" id="right-col"> |
Eugenia Gabrielova | d07556a | 2013-10-11 03:45:06 -0700 | [diff] [blame] | 219 | <div id="map_canvas" style="max-width: 100%; height: auto;"></div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 220 | </div> |
| 221 | |
Eugenia Gabrielova | 8b34c65 | 2013-10-19 06:53:27 -0700 | [diff] [blame] | 222 | <!-- Legend Container --> |
Eugenia Gabrielova | d6e88e0 | 2013-10-19 08:26:54 -0700 | [diff] [blame] | 223 | <div id="rainbow-legend-container" class="container well" style="display:none;"> |
Eugenia Gabrielova | d6e88e0 | 2013-10-19 08:26:54 -0700 | [diff] [blame] | 224 | <div class="row"> |
| 225 | <div class="col-md-5 col-md-offset-2" style="text-align: center;"># Tweets</div> |
| 226 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 227 | |
Eugenia Gabrielova | d6e88e0 | 2013-10-19 08:26:54 -0700 | [diff] [blame] | 228 | <div class="row"> |
| 229 | <div id="legend-min" class="col-md-2" style="text-align:right;"></div> |
| 230 | <div id="legend-gradient" class="col-md-5" style="text-align: center;"></div> |
| 231 | <div id="legend-max" class="col-md-2"></div> |
| 232 | <div class="col-md-3"> |
| 233 | <button id="windows-off-btn" class="btn btn-default"> |
| 234 | Close Counts |
| 235 | </button> |
| 236 | </div> |
Eugenia Gabrielova | 8b34c65 | 2013-10-19 06:53:27 -0700 | [diff] [blame] | 237 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 238 | </div><!-- End Legend Container --> |
| 239 | </div><!-- End Right Column --> |
| 240 | </div><!-- End Row --> |
| 241 | |
| 242 | <!-- Tweetbook Comment Container --> |
genia.likes.science@gmail.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 243 | <div class="modal fade" id="drilldown_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 244 | <div class="modal-dialog"> |
| 245 | <div class="modal-content"> |
| 246 | <div class="modal-body" id="drilldown_modal_body"> |
genia.likes.science@gmail.com | 0f67d9e | 2013-10-04 17:08:50 -0700 | [diff] [blame] | 247 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 248 | <!-- Tweet --> |
| 249 | <div id="modal-body-tweet" class="well well-sm"></div> |
| 250 | |
| 251 | <!-- Existing comments about this tweet --> |
| 252 | <!-- Create new comment --> |
| 253 | <div class="panel panel-default" id="modal-existing-note"> |
| 254 | <div class="panel-heading">About this Tweetbook</div> |
| 255 | <div class="panel-body" id="modal-body-notes-holder"> |
| 256 | |
| 257 | <div class="input-group"> |
| 258 | <input type="text" class="form-control" id="modal-body-tweet-note"> |
| 259 | <span class="input-group-btn"> |
| 260 | <button class="btn btn-default" id="modal-body-trash-icon"> |
| 261 | <span class="glyphicon glyphicon-trash"></span> |
| 262 | </button> |
| 263 | </span> |
| 264 | <span class="badge" id="modal-current-tweetbook"></span> |
genia.likes.science@gmail.com | 0f67d9e | 2013-10-04 17:08:50 -0700 | [diff] [blame] | 265 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 266 | |
| 267 | </div> |
| 268 | </div> |
| 269 | |
| 270 | <!-- Create new comment --> |
| 271 | <div class="panel panel-default" id="modal-save-tweet-panel"> |
| 272 | <div class="panel-heading">Save to tweetbook</div> |
| 273 | <div class="panel-body" id="modal-save-body"> |
| 274 | |
| 275 | <div class="input-group"> |
| 276 | <span class="input-group-addon">Note</span> |
| 277 | <input type="text" class="form-control" id="modal-body-add-note" placeholder="Add a note about this tweet"> |
| 278 | </div> |
| 279 | |
| 280 | <div class="input-group"> |
| 281 | <span class="input-group-addon">Add to</span> |
| 282 | <input type="text" class="form-control" id="modal-body-add-to" placeholder="Add it to a Tweetbook"> |
| 283 | </div><br/> |
| 284 | |
| 285 | <!-- Comment on tweet to save --> |
| 286 | <button type="button" class="btn btn-default" id="save-comment-tweetbook-modal">Save</button> |
| 287 | |
| 288 | <div id="modal-body-message-holder"></div> |
| 289 | |
| 290 | </div> |
| 291 | </div> |
| 292 | </div> |
| 293 | <div class="modal-footer"> |
| 294 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
genia.likes.science@gmail.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 295 | </div> |
| 296 | </div> |
genia.likes.science@gmail.com | 2de4c18 | 2013-10-04 11:39:11 -0700 | [diff] [blame] | 297 | </div> |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 298 | </div><!-- Modal --> |
| 299 | </div><!-- End Container --> |
| 300 | </div><!-- End Main Demo Tab --> |
genia.likes.science@gmail.com | 724476d | 2013-10-04 03:31:16 -0700 | [diff] [blame] | 301 | |
Eugenia Gabrielova | ab1ae55 | 2013-10-20 01:12:19 -0700 | [diff] [blame] | 302 | </div><!-- End tab list --> |
| 303 | </body> |
Eugenia Gabrielova | f29a55f | 2013-10-28 03:18:18 -0700 | [diff] [blame] | 304 | </html> |