blob: 3441ce2534d5aafb8526238f884a5da9057486bd [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
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -07009<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.com2e1e54c2013-03-31 02:31:10 +000012<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.com99e82c62013-03-31 00:26:34 +000018
19<script type="text/javascript">
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070020$(document).ready(function() {
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -070021
22 $('#checkboxes-on').click(function() {
23 $('#queryform :input').prop('checked', true);
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070024 return false;
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -070025 });
26
27 $('#checkboxes-off').click(function() {
28 $('form#queryform :input').removeAttr('checked');
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070029 return false;
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -070030 });
31
genia.likes.science@gmail.com83fb0652013-05-20 22:03:49 -070032 $('#clear-query-button').click(function() {
33 $("#qry").val('');
34 return false;
35 });
36
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070037 $("form#queryform").submit(function() {
38 $('#output-message').html("");
39 $.post("/", $("form#queryform").serialize(), function(data) {
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070040
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070041 var resSet = 0;
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000042 var resPattern = /<h4>Results:<\/h4>/g;
43 var durPattern = /<PRE>Duration/g;
44 var resultCount = data.match(resPattern);
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070045
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000046 if (!resPattern.test(data)) {
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070047 $('#output-message').html(data);
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000048 } 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 Gabrielovaf885fff2013-05-23 05:09:48 +000056
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000057 for (resSet = 0; resSet < resultCount.length; resSet++) {
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070058
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000059 $('#output-message').append('<h4>' + components[(resSet+1)*sections - 1]);
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000060
Eugenia Gabrielova7fdb1072013-05-24 03:32:54 +000061 if (sections > 1) {
62 var resNum = resSet + 1;
63 $('<button/>')
64 .attr("class", "btn")
65 .attr("data-toggle", "collapse")
66 .attr("data-target", "#collapse" + resSet)
67 .css("margin-bottom", "1em")
68 .html('Result Plan #' + resNum + '<span id="ibtn' + resSet + '" class="icon icon-chevron-down"></span>')
69 .appendTo('#output-message');
70
71 $('<div/>')
72 .attr("id", "collapse" + resSet)
73 .attr("class", "collapse in")
74 .appendTo('#output-message');
75
76 for (var c = 0; c < sections - 1; c++) {
77 var pos = resSet*sections + c;
78 $('#collapse' + resSet).append('<h4>' + components[pos]);
79 }
80
81 $('#collapse' + resSet).on('show', function() {
82 $("#ibtn" + resSet).removeClass("icon-chevron-down").addClass("icon-chevron-up");
83 }).on('hide', function() {
84 $("#ibtn" + resSet).removeClass("icon-chevron-up").addClass("icon-chevron-down");
85 });
86
87 $('#output-message').append("<hr/>");
88 }
Eugenia Gabrielovaf885fff2013-05-23 05:09:48 +000089
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070090 }
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000091 $('#output-message').append('<PRE>Duration' + splitData[1]);
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070092 }
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000093
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070094 }
genia.likes.science@gmail.com99f019d2013-05-13 04:14:46 -070095
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070096 var contentString = data.toString();
97 if (contentString.indexOf("<PRE>Duration") !== -1) {
98 $('<div/>')
99 .addClass("alert alert-success")
100 .html("Success: Query Complete")
101 .appendTo('#output-message');
102 }
103 });
104 return false;
105 });
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000106});
107</script>
108
109<meta charset=utf-8 />
genia.likes.science@gmail.com12946c42013-05-12 12:12:15 -0700110<title>AsterixDB Web Interface</title>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000111</head>
112
113<body>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700114 <div class="navbar navbar-fixed-top">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000115 <div class="navbar-inner">
116 <div class="container">
117 <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
118 <span class="icon-bar"></span>
119 <span class="icon-bar"></span>
120 <span class="icon-bar"></span>
121 </a>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700122
123 <!-- Temporary logo placeholder -->
genia.likes.science@gmail.com6995caf2013-05-20 18:05:02 -0700124 <!-- <a class="brand" href="#"><img src="/webui/static/img/finalasterixlogo.png"></a> -->
125 <a class="brand" href="#"><img src="http://db.tt/J1MTCdKs"></a>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700126
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000127 <div class="nav-collapse collapse">
128 <ul class="nav">
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +0000129 <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.comf77005c2013-05-13 01:42:24 -0700130 <li><a href="http://code.google.com/p/asterixdb/issues/list" target="_blank">File issues<i class="icon-external-link"></i></a></li>
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +0000131 <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.com99e82c62013-03-31 00:26:34 +0000132 </ul>
133 </div><!--/.nav-collapse -->
134 </div>
135 </div>
136 </div>
137
138 <div class="content">
139 <div class="container">
140 <div class="row-fluid">
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700141
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000142 <div class="span6">
genia.likes.science@gmail.com83fb0652013-05-20 22:03:49 -0700143
144 <form id="queryform" class="form-horizontal" method="post">
145 <div style="margin-bottom: 1em;">
146 <label class="query">Query</label>
147 <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 -0700148 </div>
149
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700150 <div class="btn-group">
Eugenia Gabrielova02001952013-05-24 02:47:54 +0000151 <button id="clear-query-button" class="btn">Clear Query</button>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700152 <button id="checkboxes-on" class="btn">Select All Options</button>
153 <button id="checkboxes-off" class="btn">Clear All Options</button>
Eugenia Gabrielova1e0d5e82013-05-24 02:37:43 +0000154 <button type="submit" id="run-btn" class="btn btn-custom-darken">Run</button>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700155 </div>
156
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000157 <div>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700158 <label class="checkbox"><input type="checkbox" class="btn" checked="checked" name="print-expr-tree" value="true" /> Print parsed expressions</label>
madhusudancs@gmail.com833aea72013-04-04 22:38:29 +0000159 <label class="checkbox"><input type="checkbox" checked="checked" name="print-rewritten-expr-tree" value="true" /> Print rewritten expressions</label>
madhusudancs@gmail.com833aea72013-04-04 22:38:29 +0000160 <label class="checkbox"><input type="checkbox" checked="checked" name="print-logical-plan" value="true" /> Print logical plan</label>
161 <label class="checkbox"><input type="checkbox" checked="checked" name="print-optimized-logical-plan" value="true" /> Print optimized logical plan</label>
genia.likes.science@gmail.com7e03f872013-05-12 12:15:06 -0700162 <label class="checkbox"><input type="checkbox"
163 checked="checked" name="print-job" value="true" /> Print Hyracks job</label>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000164 </div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000165 </form>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700166 </div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000167
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700168 <div class="span6">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000169 <div class="output">
170 <label class="heading">Output</label>
171 <div id="output-message" class="message">
172 </div>
173 </div>
174 </div>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700175
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000176 </div>
177 </div>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700178</div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000179 <div class="footer">
180 <section class="line"><hr></section>
181 <section class="content">
182 <section class="left">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000183 </section>
184 <section class="right">
185 &copy; Copyright 2013 University of California, Irvine
186 </section>
187 </section>
188 </div>
189</body>
190</html>
191