Merge asterix_stabilization_api_cleanup r1491:r1495.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_lsm_stabilization@1496 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
index c8b0321..976ec7c 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
@@ -1370,7 +1370,6 @@
}
switch (pdf) {
case HTML:
- out.println("<h3>Result:</h3>");
out.println("<pre>");
ResultUtils.prettyPrintHTML(out, response);
out.println("</pre>");
diff --git a/asterix-app/src/main/resources/webui/querytemplate.html b/asterix-app/src/main/resources/webui/querytemplate.html
index 23887c40..95323bb 100644
--- a/asterix-app/src/main/resources/webui/querytemplate.html
+++ b/asterix-app/src/main/resources/webui/querytemplate.html
@@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='http://fonts.googleapis.com/css?family=Bitter|PT+Sans+Caption|Open+Sans' rel='stylesheet' type='text/css'>
<script src="/webui/static/js/jquery.min.js"></script>
-<script src="/webui/static/js/jquery.autosize-min.js"></script>
<link href="/webui/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="/webui/static/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
@@ -16,9 +15,8 @@
<script type="text/javascript">
$(document).ready(function(){
- $('textarea').autosize();
-
$("form#queryform").submit(function() {
+ $('#output-message').html("");
$.post("/", $("form#queryform").serialize(), function(data) {
$('#output-message').html(data);
});
@@ -59,28 +57,18 @@
<form id="queryform" class="form-horizontal" method="post">
<div>
<label class="query">Query</label>
- <textarea rows="20" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea>
+ <textarea rows="10" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea>
</div>
<div>
- <div class="left">
- <label class="checkbox"><input type="checkbox" name="print-expr-tree" value="true" /> Print parsed expressions</label>
- </div>
- <div class="right">
- <label class="checkbox"><input type="checkbox" name="print-rewritten-expr-tree" value="true" /> Print rewritten expressions</label>
- </div>
+ <label class="checkbox"><input type="checkbox" checked="checked" name="print-expr-tree" value="true" /> Print parsed expressions</label>
+ <label class="checkbox"><input type="checkbox" checked="checked" name="print-rewritten-expr-tree" value="true" /> Print rewritten expressions</label>
</div>
<div>
- <div class="left">
- <label class="checkbox"><input type="checkbox" name="print-logical-plan" value="true" /> Print logical plan</label>
- </div>
- <div class="right">
- <label class="checkbox"><input type="checkbox" name="print-optimized-logical-plan" value="true" /> Print optimized logical plan</label>
- </div>
+ <label class="checkbox"><input type="checkbox" checked="checked" name="print-logical-plan" value="true" /> Print logical plan</label>
+ <label class="checkbox"><input type="checkbox" checked="checked" name="print-optimized-logical-plan" value="true" /> Print optimized logical plan</label>
</div>
<div>
- <div class="left">
- <label class="checkbox"><input type="checkbox" name="print-job" value="true" /> Print hyracks job</label>
- </div>
+ <label class="checkbox"><input type="checkbox" checked="checked" name="print-job" value="true" /> Print hyracks job</label>
</div>
<button type="submit" class="btn btn-danger">Execute</button>
</form>
diff --git a/asterix-app/src/main/resources/webui/static/css/style.css b/asterix-app/src/main/resources/webui/static/css/style.css
index 673cd07..10f28dd 100644
--- a/asterix-app/src/main/resources/webui/static/css/style.css
+++ b/asterix-app/src/main/resources/webui/static/css/style.css
@@ -50,16 +50,11 @@
font-family: bitter, helvetica;
width: 100%;
padding: 10px;
- color: #999;
+ color: #333;
resize: none;
border: 10px solid #eee;
}
-textarea.query:focus {
- outline: none;
- color: #333;
-}
-
label {
padding-top: 10px;
}
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
index 2602707..1555549 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
@@ -51,11 +51,15 @@
int num = 0;
int chunkCounter = 0;
int recordCounter = 0;
- try {
+ try {
while ((lineExpected = readerExpected.readLine()) != null) {
- if (jArray.length() <= 0) {
- throw new Exception("No results returned for query.");
+ // Skip the blank line in the expected file.
+ if (lineExpected.isEmpty()) {
+ continue;
+ }
+ if (jArray.length() <= chunkCounter) {
+ throw new Exception("No more results available.");
}
JSONArray resultArray = jArray.getJSONArray(chunkCounter);
@@ -73,19 +77,11 @@
if (recordCounter >= resultArray.length()) {
chunkCounter++;
recordCounter = 0;
- if (chunkCounter >= jArray.length()) {
- break;
- }
}
}
-
- while ((lineExpected = readerExpected.readLine()) != null) {
- // TODO(khurram): Print out the remaining expected file contents
- }
} finally {
readerExpected.close();
}
-
}
private static boolean equalStrings(String s1, String s2) {