blob: 3d435e453025ad3acf6a2fa2f999be5d8a2b7130 [file] [log] [blame]
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +00001<!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.com2e1e54c2013-03-31 02:31:10 +00007<script src="/webui/static/js/jquery.min.js"></script>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +00008
madhusudancs@gmail.com2e1e54c2013-03-31 02:31:10 +00009<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.com99e82c62013-03-31 00:26:34 +000015
16<script type="text/javascript">
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070017$(document).ready(function() {
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -070018
19 $('#checkboxes-on').click(function() {
genia.likes.science@gmail.com016314e2013-05-25 03:19:07 -070020 /* 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.comb0680b32013-05-22 16:21:53 -070028 return false;
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -070029 });
30
genia.likes.science@gmail.com83fb0652013-05-20 22:03:49 -070031 $('#clear-query-button').click(function() {
32 $("#qry").val('');
33 return false;
34 });
35
genia.likes.science@gmail.com016314e2013-05-25 03:19:07 -070036 $('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.comb0680b32013-05-22 16:21:53 -070047 $("form#queryform").submit(function() {
48 $('#output-message').html("");
49 $.post("/", $("form#queryform").serialize(), function(data) {
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070050
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070051 var resSet = 0;
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000052 var resPattern = /<h4>Results:<\/h4>/g;
53 var durPattern = /<PRE>Duration/g;
54 var resultCount = data.match(resPattern);
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070055
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000056 if (!resPattern.test(data)) {
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070057 $('#output-message').html(data);
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000058 } 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 Gabrielovaf885fff2013-05-23 05:09:48 +000066
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000067 for (resSet = 0; resSet < resultCount.length; resSet++) {
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070068
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000069 $('#output-message').append('<h4>' + components[(resSet+1)*sections - 1]);
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000070
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000071 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.com2b908172013-05-25 03:41:52 -070078 .html('Result Plan #' + resNum + '<i id="ibtn' + resSet + '" class="icon-plus extarget"></i>')
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000079 .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.com2b908172013-05-25 03:41:52 -070091 /* Placeholder for future on show/hide result plan behavior
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000092 $('#collapse' + resSet).on('show', function() {
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000093 }).on('hide', function() {
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000094 });
genia.likes.science@gmail.com2b908172013-05-25 03:41:52 -070095 */
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000096
97 $('#output-message').append("<hr/>");
98 }
Eugenia Gabrielovaf885fff2013-05-23 05:09:48 +000099
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -0700100 }
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +0000101 $('#output-message').append('<PRE>Duration' + splitData[1]);
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -0700102 }
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +0000103
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -0700104 }
genia.likes.science@gmail.com99f019d2013-05-13 04:14:46 -0700105
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -0700106 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.com99e82c62013-03-31 00:26:34 +0000116});
117</script>
118
119<meta charset=utf-8 />
genia.likes.science@gmail.com12946c42013-05-12 12:12:15 -0700120<title>AsterixDB Web Interface</title>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000121</head>
122
123<body>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700124 <div class="navbar navbar-fixed-top">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000125 <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.combcd0ea12013-05-13 01:34:31 -0700132
133 <!-- Temporary logo placeholder -->
genia.likes.science@gmail.com766d9872013-05-24 12:57:48 -0700134 <a class="brand" href="#"><img src="/webui/static/img/finalasterixlogo.png"></a>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700135
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000136 <div class="nav-collapse collapse">
137 <ul class="nav">
genia.likes.science@gmail.com5db8ef22013-05-24 14:05:55 -0700138 <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.com99e82c62013-03-31 00:26:34 +0000144 </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.com024749d2013-05-20 21:33:08 -0700153
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000154 <div class="span6">
genia.likes.science@gmail.com83fb0652013-05-20 22:03:49 -0700155
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.com83fb0652013-05-20 22:03:49 -0700160 </div>
161
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700162 <div class="btn-group">
genia.likes.science@gmail.com016314e2013-05-25 03:19:07 -0700163 <button id="checkboxes-on" class="btn"><i id="opts" class="icon-ok" ></i>Select Options</button>
Eugenia Gabrielova02001952013-05-24 02:47:54 +0000164 <button id="clear-query-button" class="btn">Clear Query</button>
genia.likes.science@gmail.com016314e2013-05-25 03:19:07 -0700165 <!-- <button id="checkboxes-off" class="btn">Clear All Options</button> -->
Eugenia Gabrielova1e0d5e82013-05-24 02:37:43 +0000166 <button type="submit" id="run-btn" class="btn btn-custom-darken">Run</button>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700167 </div>
168
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000169 <div>
genia.likes.science@gmail.com016314e2013-05-25 03:19:07 -0700170 <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.com99e82c62013-03-31 00:26:34 +0000175 </div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000176 </form>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700177 </div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000178
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700179 <div class="span6">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000180 <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.com024749d2013-05-20 21:33:08 -0700186
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000187 </div>
188 </div>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700189</div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000190 <div class="footer">
191 <section class="line"><hr></section>
192 <section class="content">
193 <section class="left">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000194 </section>
195 <section class="right">
196 &copy; Copyright 2013 University of California, Irvine
197 </section>
198 </section>
199 </div>
200</body>
201</html>
202