madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta name="description" content="ASTERIX WEB PAGE" /> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <link href='http://fonts.googleapis.com/css?family=Bitter|PT+Sans+Caption|Open+Sans' rel='stylesheet' type='text/css'> |
madhusudancs@gmail.com | 2e1e54c | 2013-03-31 02:31:10 +0000 | [diff] [blame] | 7 | <script src="/webui/static/js/jquery.min.js"></script> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 8 | |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 9 | <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> |
| 10 | <link href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet"> |
| 11 | |
madhusudancs@gmail.com | 2e1e54c | 2013-03-31 02:31:10 +0000 | [diff] [blame] | 12 | <link href="/webui/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
| 13 | <link href="/webui/static/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" /> |
| 14 | |
| 15 | <script src="/webui/static/js/bootstrap.min.js"></script> |
| 16 | |
| 17 | <link href="/webui/static/css/style.css" rel="stylesheet" type="text/css" /> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 18 | |
| 19 | <script type="text/javascript"> |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 20 | $(document).ready(function() { |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 21 | |
| 22 | $('#checkboxes-on').click(function() { |
| 23 | $('#queryform :input').prop('checked', true); |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 24 | return false; |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 25 | }); |
| 26 | |
| 27 | $('#checkboxes-off').click(function() { |
| 28 | $('form#queryform :input').removeAttr('checked'); |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 29 | return false; |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 30 | }); |
| 31 | |
genia.likes.science@gmail.com | 83fb065 | 2013-05-20 22:03:49 -0700 | [diff] [blame] | 32 | $('#clear-query-button').click(function() { |
| 33 | $("#qry").val(''); |
| 34 | return false; |
| 35 | }); |
| 36 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 37 | $("form#queryform").submit(function() { |
| 38 | $('#output-message').html(""); |
| 39 | $.post("/", $("form#queryform").serialize(), function(data) { |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 40 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 41 | var resSet = 0; |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 42 | var resPattern = /<h4>Results:<\/h4>/g; |
| 43 | var durPattern = /<PRE>Duration/g; |
| 44 | var resultCount = data.match(resPattern); |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 45 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 46 | if (!resPattern.test(data)) { |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 47 | $('#output-message').html(data); |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 48 | } else { |
| 49 | if (resultCount.length <= 1) { |
| 50 | $('#output-message').html(data); |
| 51 | } else { |
| 52 | var splitData = data.split('<PRE>Duration'); |
| 53 | var results = splitData[0].split('<h4>'); |
| 54 | var components = results.slice(1, results.length); |
| 55 | var sections = components.length / resultCount.length; |
Eugenia Gabrielova | f885fff | 2013-05-23 05:09:48 +0000 | [diff] [blame^] | 56 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 57 | for (resSet = 0; resSet < resultCount.length; resSet++) { |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 58 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 59 | var resNum = resSet + 1; |
Eugenia Gabrielova | f885fff | 2013-05-23 05:09:48 +0000 | [diff] [blame^] | 60 | $('<button/>') |
| 61 | .attr("class", "btn") |
| 62 | .attr("data-toggle", "collapse") |
| 63 | .attr("data-target", "#collapse" + resSet) |
| 64 | .css("margin-bottom", "1em") |
| 65 | .html('Result #' + resNum + '<span id="ibtn' + resSet + '" class="icon icon-chevron-down"></span>') |
| 66 | .appendTo('#output-message'); |
| 67 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 68 | $('<div/>') |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 69 | .attr("id", "collapse" + resSet) |
Eugenia Gabrielova | f885fff | 2013-05-23 05:09:48 +0000 | [diff] [blame^] | 70 | .attr("class", "collapse in") |
| 71 | .appendTo('#output-message'); |
| 72 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 73 | for (var c = 0; c < sections; c++) { |
| 74 | var pos = resSet*sections + c; |
| 75 | $('#collapse' + resSet).append('<h4>' + components[pos]); |
| 76 | } |
| 77 | |
Eugenia Gabrielova | f885fff | 2013-05-23 05:09:48 +0000 | [diff] [blame^] | 78 | $('#collapse' + resSet).on('show', function() { |
| 79 | $("#ibtn" + resSet).removeClass("icon-chevron-down").addClass("icon-chevron-up"); |
| 80 | }).on('hide', function() { |
| 81 | $("#ibtn" + resSet).removeClass("icon-chevron-up").addClass("icon-chevron-down"); |
| 82 | }); |
| 83 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 84 | } |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 85 | $('#output-message').append('<PRE>Duration' + splitData[1]); |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 86 | } |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 87 | |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 88 | } |
genia.likes.science@gmail.com | 99f019d | 2013-05-13 04:14:46 -0700 | [diff] [blame] | 89 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 90 | var contentString = data.toString(); |
| 91 | if (contentString.indexOf("<PRE>Duration") !== -1) { |
| 92 | $('<div/>') |
| 93 | .addClass("alert alert-success") |
| 94 | .html("Success: Query Complete") |
| 95 | .appendTo('#output-message'); |
| 96 | } |
| 97 | }); |
| 98 | return false; |
| 99 | }); |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 100 | }); |
| 101 | </script> |
| 102 | |
| 103 | <meta charset=utf-8 /> |
genia.likes.science@gmail.com | 12946c4 | 2013-05-12 12:12:15 -0700 | [diff] [blame] | 104 | <title>AsterixDB Web Interface</title> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 105 | </head> |
| 106 | |
| 107 | <body> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 108 | <div class="navbar navbar-fixed-top"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 109 | <div class="navbar-inner"> |
| 110 | <div class="container"> |
| 111 | <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
| 112 | <span class="icon-bar"></span> |
| 113 | <span class="icon-bar"></span> |
| 114 | <span class="icon-bar"></span> |
| 115 | </a> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 116 | |
| 117 | <!-- Temporary logo placeholder --> |
genia.likes.science@gmail.com | 6995caf | 2013-05-20 18:05:02 -0700 | [diff] [blame] | 118 | <!-- <a class="brand" href="#"><img src="/webui/static/img/finalasterixlogo.png"></a> --> |
| 119 | <a class="brand" href="#"><img src="http://db.tt/J1MTCdKs"></a> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 120 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 121 | <div class="nav-collapse collapse"> |
| 122 | <ul class="nav"> |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 123 | <li><a href="http://code.google.com/p/asterixdb/" target="_blank">Open source<i class="icon-external-link"></i></a></li> |
genia.likes.science@gmail.com | f77005c | 2013-05-13 01:42:24 -0700 | [diff] [blame] | 124 | <li><a href="http://code.google.com/p/asterixdb/issues/list" target="_blank">File issues<i class="icon-external-link"></i></a></li> |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 125 | <li><a href="https://groups.google.com/forum/?fromgroups#!forum/asterixdb-users" target="_blank">Contact<i class="icon-external-link"></i></a></li> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 126 | </ul> |
| 127 | </div><!--/.nav-collapse --> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| 131 | |
| 132 | <div class="content"> |
| 133 | <div class="container"> |
| 134 | <div class="row-fluid"> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 135 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 136 | <div class="span6"> |
genia.likes.science@gmail.com | 83fb065 | 2013-05-20 22:03:49 -0700 | [diff] [blame] | 137 | |
| 138 | <form id="queryform" class="form-horizontal" method="post"> |
| 139 | <div style="margin-bottom: 1em;"> |
| 140 | <label class="query">Query</label> |
| 141 | <textarea rows="10" id="qry" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea> |
| 142 | <button id="clear-query-button" style="float:right;" class="btn">Clear Query</button> |
| 143 | </div> |
| 144 | |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 145 | <div class="btn-group"> |
| 146 | <button id="checkboxes-on" class="btn">Select All Options</button> |
| 147 | <button id="checkboxes-off" class="btn">Clear All Options</button> |
| 148 | </div> |
| 149 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 150 | <div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 151 | <label class="checkbox"><input type="checkbox" class="btn" checked="checked" name="print-expr-tree" value="true" /> Print parsed expressions</label> |
madhusudancs@gmail.com | 833aea7 | 2013-04-04 22:38:29 +0000 | [diff] [blame] | 152 | <label class="checkbox"><input type="checkbox" checked="checked" name="print-rewritten-expr-tree" value="true" /> Print rewritten expressions</label> |
madhusudancs@gmail.com | 833aea7 | 2013-04-04 22:38:29 +0000 | [diff] [blame] | 153 | <label class="checkbox"><input type="checkbox" checked="checked" name="print-logical-plan" value="true" /> Print logical plan</label> |
| 154 | <label class="checkbox"><input type="checkbox" checked="checked" name="print-optimized-logical-plan" value="true" /> Print optimized logical plan</label> |
genia.likes.science@gmail.com | 7e03f87 | 2013-05-12 12:15:06 -0700 | [diff] [blame] | 155 | <label class="checkbox"><input type="checkbox" |
| 156 | checked="checked" name="print-job" value="true" /> Print Hyracks job</label> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 157 | </div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 158 | <button type="submit" id="run-btn" class="btn btn-custom-darken">Run</button> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 159 | </form> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 160 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 161 | |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 162 | <div class="span6"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 163 | <div class="output"> |
| 164 | <label class="heading">Output</label> |
| 165 | <div id="output-message" class="message"> |
| 166 | </div> |
| 167 | </div> |
| 168 | </div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 169 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 170 | </div> |
| 171 | </div> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 172 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 173 | <div class="footer"> |
| 174 | <section class="line"><hr></section> |
| 175 | <section class="content"> |
| 176 | <section class="left"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 177 | </section> |
| 178 | <section class="right"> |
| 179 | © Copyright 2013 University of California, Irvine |
| 180 | </section> |
| 181 | </section> |
| 182 | </div> |
| 183 | </body> |
| 184 | </html> |
| 185 | |