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 | |
madhusudancs@gmail.com | 2e1e54c | 2013-03-31 02:31:10 +0000 | [diff] [blame] | 9 | <link href="/webui/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
| 10 | <link href="/webui/static/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" /> |
| 11 | |
| 12 | <script src="/webui/static/js/bootstrap.min.js"></script> |
| 13 | |
| 14 | <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] | 15 | |
| 16 | <script type="text/javascript"> |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 17 | $(document).ready(function() { |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 18 | |
| 19 | $('#checkboxes-on').click(function() { |
genia.likes.science@gmail.com | 016314e | 2013-05-25 03:19:07 -0700 | [diff] [blame] | 20 | /* Displays a checkmark to indicate selection/clearing */ |
| 21 | if ($('#opts').is(":visible")) { |
| 22 | $('#opts').hide(); |
| 23 | $('#queryform :input').prop('checked', false); |
| 24 | } else { |
| 25 | $('#opts').show(); |
| 26 | $('#queryform :input').prop('checked', true); |
| 27 | } |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 28 | return false; |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 29 | }); |
| 30 | |
genia.likes.science@gmail.com | 83fb065 | 2013-05-20 22:03:49 -0700 | [diff] [blame] | 31 | $('#clear-query-button').click(function() { |
| 32 | $("#qry").val(''); |
| 33 | return false; |
| 34 | }); |
| 35 | |
genia.likes.science@gmail.com | 016314e | 2013-05-25 03:19:07 -0700 | [diff] [blame] | 36 | $('form#queryform :input').click( function () { |
| 37 | /* Hides selection check on uncheck, shows when all 5 selected */ |
| 38 | if ($(this).val()) { |
| 39 | if ($(this).is(':checked') && $('input[type=checkbox]').filter(':checked').length == 5) { |
| 40 | $('#opts').show(); |
| 41 | } else { |
| 42 | $('#opts').hide(); |
| 43 | } |
| 44 | } |
| 45 | }); |
| 46 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 47 | $("form#queryform").submit(function() { |
| 48 | $('#output-message').html(""); |
| 49 | $.post("/", $("form#queryform").serialize(), function(data) { |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 50 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 51 | var resSet = 0; |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 52 | var resPattern = /<h4>Results:<\/h4>/g; |
| 53 | var durPattern = /<PRE>Duration/g; |
| 54 | var resultCount = data.match(resPattern); |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 55 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 56 | if (!resPattern.test(data)) { |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 57 | $('#output-message').html(data); |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 58 | } else { |
| 59 | if (resultCount.length <= 1) { |
| 60 | $('#output-message').html(data); |
| 61 | } else { |
| 62 | var splitData = data.split('<PRE>Duration'); |
| 63 | var results = splitData[0].split('<h4>'); |
| 64 | var components = results.slice(1, results.length); |
| 65 | var sections = components.length / resultCount.length; |
Eugenia Gabrielova | f885fff | 2013-05-23 05:09:48 +0000 | [diff] [blame] | 66 | |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 67 | for (resSet = 0; resSet < resultCount.length; resSet++) { |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 68 | |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 69 | $('#output-message').append('<h4>' + components[(resSet+1)*sections - 1]); |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 70 | |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 71 | if (sections > 1) { |
| 72 | var resNum = resSet + 1; |
| 73 | $('<button/>') |
| 74 | .attr("class", "btn") |
| 75 | .attr("data-toggle", "collapse") |
| 76 | .attr("data-target", "#collapse" + resSet) |
| 77 | .css("margin-bottom", "1em") |
genia.likes.science@gmail.com | 2b90817 | 2013-05-25 03:41:52 -0700 | [diff] [blame] | 78 | .html('Result Plan #' + resNum + '<i id="ibtn' + resSet + '" class="icon-plus extarget"></i>') |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 79 | .appendTo('#output-message'); |
| 80 | |
| 81 | $('<div/>') |
| 82 | .attr("id", "collapse" + resSet) |
| 83 | .attr("class", "collapse in") |
| 84 | .appendTo('#output-message'); |
| 85 | |
| 86 | for (var c = 0; c < sections - 1; c++) { |
| 87 | var pos = resSet*sections + c; |
| 88 | $('#collapse' + resSet).append('<h4>' + components[pos]); |
| 89 | } |
| 90 | |
genia.likes.science@gmail.com | 2b90817 | 2013-05-25 03:41:52 -0700 | [diff] [blame] | 91 | /* Placeholder for future on show/hide result plan behavior |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 92 | $('#collapse' + resSet).on('show', function() { |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 93 | }).on('hide', function() { |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 94 | }); |
genia.likes.science@gmail.com | 2b90817 | 2013-05-25 03:41:52 -0700 | [diff] [blame] | 95 | */ |
Eugenia Gabrielova | 7fdb107 | 2013-05-24 03:32:54 +0000 | [diff] [blame] | 96 | |
| 97 | $('#output-message').append("<hr/>"); |
| 98 | } |
Eugenia Gabrielova | f885fff | 2013-05-23 05:09:48 +0000 | [diff] [blame] | 99 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 100 | } |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 101 | $('#output-message').append('<PRE>Duration' + splitData[1]); |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 102 | } |
Eugenia Gabrielova | c459e2b | 2013-05-23 02:59:43 +0000 | [diff] [blame] | 103 | |
genia.likes.science@gmail.com | c69cb70 | 2013-05-22 12:50:52 -0700 | [diff] [blame] | 104 | } |
genia.likes.science@gmail.com | 99f019d | 2013-05-13 04:14:46 -0700 | [diff] [blame] | 105 | |
genia.likes.science@gmail.com | b0680b3 | 2013-05-22 16:21:53 -0700 | [diff] [blame] | 106 | var contentString = data.toString(); |
| 107 | if (contentString.indexOf("<PRE>Duration") !== -1) { |
| 108 | $('<div/>') |
| 109 | .addClass("alert alert-success") |
| 110 | .html("Success: Query Complete") |
| 111 | .appendTo('#output-message'); |
| 112 | } |
| 113 | }); |
| 114 | return false; |
| 115 | }); |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 116 | }); |
| 117 | </script> |
| 118 | |
| 119 | <meta charset=utf-8 /> |
genia.likes.science@gmail.com | 12946c4 | 2013-05-12 12:12:15 -0700 | [diff] [blame] | 120 | <title>AsterixDB Web Interface</title> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 121 | </head> |
| 122 | |
| 123 | <body> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 124 | <div class="navbar navbar-fixed-top"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 125 | <div class="navbar-inner"> |
| 126 | <div class="container"> |
| 127 | <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
| 128 | <span class="icon-bar"></span> |
| 129 | <span class="icon-bar"></span> |
| 130 | <span class="icon-bar"></span> |
| 131 | </a> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 132 | |
| 133 | <!-- Temporary logo placeholder --> |
genia.likes.science@gmail.com | 766d987 | 2013-05-24 12:57:48 -0700 | [diff] [blame] | 134 | <a class="brand" href="#"><img src="/webui/static/img/finalasterixlogo.png"></a> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 135 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 136 | <div class="nav-collapse collapse"> |
| 137 | <ul class="nav"> |
genia.likes.science@gmail.com | 5db8ef2 | 2013-05-24 14:05:55 -0700 | [diff] [blame] | 138 | <li><a href="http://code.google.com/p/asterixdb/" target="_blank"> |
| 139 | Open source<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li> |
| 140 | <li><a href="http://code.google.com/p/asterixdb/issues/list" target="_blank"> |
| 141 | File issues<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li> |
| 142 | <li><a href="https://groups.google.com/forum/?fromgroups#!forum/asterixdb-users" target="_blank"> |
| 143 | Contact<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 144 | </ul> |
| 145 | </div><!--/.nav-collapse --> |
| 146 | </div> |
| 147 | </div> |
| 148 | </div> |
| 149 | |
| 150 | <div class="content"> |
| 151 | <div class="container"> |
| 152 | <div class="row-fluid"> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 153 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 154 | <div class="span6"> |
genia.likes.science@gmail.com | 83fb065 | 2013-05-20 22:03:49 -0700 | [diff] [blame] | 155 | |
| 156 | <form id="queryform" class="form-horizontal" method="post"> |
| 157 | <div style="margin-bottom: 1em;"> |
| 158 | <label class="query">Query</label> |
| 159 | <textarea rows="10" id="qry" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea> |
genia.likes.science@gmail.com | 83fb065 | 2013-05-20 22:03:49 -0700 | [diff] [blame] | 160 | </div> |
| 161 | |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 162 | <div class="btn-group"> |
genia.likes.science@gmail.com | 016314e | 2013-05-25 03:19:07 -0700 | [diff] [blame] | 163 | <button id="checkboxes-on" class="btn"><i id="opts" class="icon-ok" ></i>Select Options</button> |
Eugenia Gabrielova | 0200195 | 2013-05-24 02:47:54 +0000 | [diff] [blame] | 164 | <button id="clear-query-button" class="btn">Clear Query</button> |
genia.likes.science@gmail.com | 016314e | 2013-05-25 03:19:07 -0700 | [diff] [blame] | 165 | <!-- <button id="checkboxes-off" class="btn">Clear All Options</button> --> |
Eugenia Gabrielova | 1e0d5e8 | 2013-05-24 02:37:43 +0000 | [diff] [blame] | 166 | <button type="submit" id="run-btn" class="btn btn-custom-darken">Run</button> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 167 | </div> |
| 168 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 169 | <div> |
genia.likes.science@gmail.com | 016314e | 2013-05-25 03:19:07 -0700 | [diff] [blame] | 170 | <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-expr-tree" value="true" /> Print parsed expressions</label> |
| 171 | <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-rewritten-expr-tree" value="true" /> Print rewritten expressions</label> |
| 172 | <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-logical-plan" value="true" /> Print logical plan</label> |
| 173 | <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-optimized-logical-plan" value="true" /> Print optimized logical plan</label> |
| 174 | <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-job" value="true" /> Print Hyracks job</label> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 175 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 176 | </form> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 177 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 178 | |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 179 | <div class="span6"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 180 | <div class="output"> |
| 181 | <label class="heading">Output</label> |
| 182 | <div id="output-message" class="message"> |
| 183 | </div> |
| 184 | </div> |
| 185 | </div> |
genia.likes.science@gmail.com | 024749d | 2013-05-20 21:33:08 -0700 | [diff] [blame] | 186 | |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 187 | </div> |
| 188 | </div> |
genia.likes.science@gmail.com | bcd0ea1 | 2013-05-13 01:34:31 -0700 | [diff] [blame] | 189 | </div> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 190 | <div class="footer"> |
| 191 | <section class="line"><hr></section> |
| 192 | <section class="content"> |
| 193 | <section class="left"> |
madhusudancs@gmail.com | 99e82c6 | 2013-03-31 00:26:34 +0000 | [diff] [blame] | 194 | </section> |
| 195 | <section class="right"> |
| 196 | © Copyright 2013 University of California, Irvine |
| 197 | </section> |
| 198 | </section> |
| 199 | </div> |
| 200 | </body> |
| 201 | </html> |
| 202 | |