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; |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 56 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 57 | $('<div/>') |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 58 | .attr("class", "accordion") |
| 59 | .attr("id", "output-organization") |
| 60 | .appendTo('#output-message'); |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 61 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 62 | for (resSet = 0; resSet < resultCount.length; resSet++) { |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 63 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 64 | $('<div/>') |
| 65 | .attr("class", "accordion-group") |
| 66 | .attr("id", "agroup" + resSet) |
| 67 | .appendTo("#output-organization"); |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 68 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 69 | var resNum = resSet + 1; |
| 70 | $('<div/>') |
| 71 | .attr("class", "accordion-heading") |
| 72 | .html('<a class="accordion-toggle" data-toggle="collapse" data-parent="output-organization" href="#collapse' + resSet + '">Result #' + resNum + '</a>') |
| 73 | .appendTo("#agroup" + resSet); |
| 74 | |
| 75 | $('<div/>') |
| 76 | .attr("class", "accordion-body collapse in") |
| 77 | .attr("id", "collapse" + resSet) |
| 78 | .html('<div class="accordion-inner">') |
| 79 | .appendTo("#agroup" + resSet); |
| 80 | |
| 81 | for (var c = 0; c < sections; c++) { |
| 82 | var pos = resSet*sections + c; |
| 83 | $('#collapse' + resSet).append('<h4>' + components[pos]); |
| 84 | } |
| 85 | |
| 86 | $('#collapse'+resSet).append('</div>'); |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 87 | } |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 88 | $('#output-message').append('<PRE>Duration' + splitData[1]); |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 89 | } |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 90 | |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 91 | } |
genia.likes.science@gmail.com | 99f019d | 2013-05-13 04:14:46 -0700 | [diff] [blame] | 92 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 93 | var contentString = data.toString(); |
| 94 | if (contentString.indexOf("<PRE>Duration") !== -1) { |
| 95 | $('<div/>') |
| 96 | .addClass("alert alert-success") |
| 97 | .html("Success: Query Complete") |
| 98 | .appendTo('#output-message'); |
| 99 | } |
| 100 | }); |
| 101 | return false; |
| 102 | }); |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 103 | }); |
| 104 | </script> |
| 105 | |
| 106 | <meta charset=utf-8 /> |
genia.likes.science@gmail.com | 12946c4 | 2013-05-12 12:12:15 -0700 | [diff] [blame] | 107 | <title>AsterixDB Web Interface</title> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 108 | </head> |
| 109 | |
| 110 | <body> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 111 | <div class="navbar navbar-fixed-top"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 112 | <div class="navbar-inner"> |
| 113 | <div class="container"> |
| 114 | <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
| 115 | <span class="icon-bar"></span> |
| 116 | <span class="icon-bar"></span> |
| 117 | <span class="icon-bar"></span> |
| 118 | </a> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 119 | |
| 120 | <!-- Temporary logo placeholder --> |
genia.likes.science@gmail.com | 6995caf | 2013-05-20 18:05:02 -0700 | [diff] [blame] | 121 | <!-- <a class="brand" href="#"><img src="/webui/static/img/finalasterixlogo.png"></a> --> |
| 122 | <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] | 123 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 124 | <div class="nav-collapse collapse"> |
| 125 | <ul class="nav"> |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame^] | 126 | <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] | 127 | <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^] | 128 | <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] | 129 | </ul> |
| 130 | </div><!--/.nav-collapse --> |
| 131 | </div> |
| 132 | </div> |
| 133 | </div> |
| 134 | |
| 135 | <div class="content"> |
| 136 | <div class="container"> |
| 137 | <div class="row-fluid"> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 138 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 139 | <div class="span6"> |
genia.likes.science@gmail.com | 83fb065 | 2013-05-20 22:03:49 -0700 | [diff] [blame] | 140 | |
| 141 | <form id="queryform" class="form-horizontal" method="post"> |
| 142 | <div style="margin-bottom: 1em;"> |
| 143 | <label class="query">Query</label> |
| 144 | <textarea rows="10" id="qry" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea> |
| 145 | <button id="clear-query-button" style="float:right;" class="btn">Clear Query</button> |
| 146 | </div> |
| 147 | |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 148 | <div class="btn-group"> |
| 149 | <button id="checkboxes-on" class="btn">Select All Options</button> |
| 150 | <button id="checkboxes-off" class="btn">Clear All Options</button> |
| 151 | </div> |
| 152 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 153 | <div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 154 | <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] | 155 | <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] | 156 | <label class="checkbox"><input type="checkbox" checked="checked" name="print-logical-plan" value="true" /> Print logical plan</label> |
| 157 | <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] | 158 | <label class="checkbox"><input type="checkbox" |
| 159 | checked="checked" name="print-job" value="true" /> Print Hyracks job</label> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 160 | </div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 161 | <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] | 162 | </form> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 163 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 164 | |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 165 | <div class="span6"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 166 | <div class="output"> |
| 167 | <label class="heading">Output</label> |
| 168 | <div id="output-message" class="message"> |
| 169 | </div> |
| 170 | </div> |
| 171 | </div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 172 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 173 | </div> |
| 174 | </div> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 175 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 176 | <div class="footer"> |
| 177 | <section class="line"><hr></section> |
| 178 | <section class="content"> |
| 179 | <section class="left"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 180 | </section> |
| 181 | <section class="right"> |
| 182 | © Copyright 2013 University of California, Irvine |
| 183 | </section> |
| 184 | </section> |
| 185 | </div> |
| 186 | </body> |
| 187 | </html> |
| 188 | |