blob: cfe0b11a6ffdb053b88f69c470c66a2ab338b135 [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 Gabrielovac459e2b2013-05-23 02:59:43 +000059 var resNum = resSet + 1;
Eugenia Gabrielovaf885fff2013-05-23 05:09:48 +000060 $('<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 Gabrielovac459e2b2013-05-23 02:59:43 +000068 $('<div/>')
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000069 .attr("id", "collapse" + resSet)
Eugenia Gabrielovaf885fff2013-05-23 05:09:48 +000070 .attr("class", "collapse in")
71 .appendTo('#output-message');
72
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000073 for (var c = 0; c < sections; c++) {
74 var pos = resSet*sections + c;
75 $('#collapse' + resSet).append('<h4>' + components[pos]);
76 }
77
Eugenia Gabrielovaf885fff2013-05-23 05:09:48 +000078 $('#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.comb0680b32013-05-22 16:21:53 -070084 }
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000085 $('#output-message').append('<PRE>Duration' + splitData[1]);
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070086 }
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +000087
genia.likes.science@gmail.comc69cb702013-05-22 12:50:52 -070088 }
genia.likes.science@gmail.com99f019d2013-05-13 04:14:46 -070089
genia.likes.science@gmail.comb0680b32013-05-22 16:21:53 -070090 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.com99e82c62013-03-31 00:26:34 +0000100});
101</script>
102
103<meta charset=utf-8 />
genia.likes.science@gmail.com12946c42013-05-12 12:12:15 -0700104<title>AsterixDB Web Interface</title>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000105</head>
106
107<body>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700108 <div class="navbar navbar-fixed-top">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000109 <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.combcd0ea12013-05-13 01:34:31 -0700116
117 <!-- Temporary logo placeholder -->
genia.likes.science@gmail.com6995caf2013-05-20 18:05:02 -0700118 <!-- <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.combcd0ea12013-05-13 01:34:31 -0700120
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000121 <div class="nav-collapse collapse">
122 <ul class="nav">
Eugenia Gabrielovac459e2b2013-05-23 02:59:43 +0000123 <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 -0700124 <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 +0000125 <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 +0000126 </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.com024749d2013-05-20 21:33:08 -0700135
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000136 <div class="span6">
genia.likes.science@gmail.com83fb0652013-05-20 22:03:49 -0700137
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.com024749d2013-05-20 21:33:08 -0700145 <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.com99e82c62013-03-31 00:26:34 +0000150 <div>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700151 <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 +0000152 <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 +0000153 <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.com7e03f872013-05-12 12:15:06 -0700155 <label class="checkbox"><input type="checkbox"
156 checked="checked" name="print-job" value="true" /> Print Hyracks job</label>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000157 </div>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700158 <button type="submit" id="run-btn" class="btn btn-custom-darken">Run</button>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000159 </form>
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700160 </div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000161
genia.likes.science@gmail.com024749d2013-05-20 21:33:08 -0700162 <div class="span6">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000163 <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.com024749d2013-05-20 21:33:08 -0700169
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000170 </div>
171 </div>
genia.likes.science@gmail.combcd0ea12013-05-13 01:34:31 -0700172</div>
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000173 <div class="footer">
174 <section class="line"><hr></section>
175 <section class="content">
176 <section class="left">
madhusudancs@gmail.com99e82c62013-03-31 00:26:34 +0000177 </section>
178 <section class="right">
179 &copy; Copyright 2013 University of California, Irvine
180 </section>
181 </section>
182 </div>
183</body>
184</html>
185