<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="ASTERIX WEB PAGE" />
<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>

<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" />

<script src="/webui/static/js/bootstrap.min.js"></script>

<link href="/webui/static/css/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
$(document).ready(function() {

    $('#checkboxes-on').click(function() {
        /* Displays a checkmark to indicate selection/clearing */
        if ($('#opts').is(":visible")) {
            $('#opts').hide();
            $('#queryform :input').prop('checked', false);
        } else {
            $('#opts').show();    
            $('#queryform :input').prop('checked', true);
        }    
        return false;
    });

    $('#clear-query-button').click(function() {
        $("#qry").val('');
        return false;
    });

    $('form#queryform :input').click( function () {
        /* Hides selection check on uncheck, shows when all 5 selected */
        if ($(this).val()) {
            if ($(this).is(':checked') && $('input[type=checkbox]').filter(':checked').length == 5) {
                $('#opts').show();
            } else {
                $('#opts').hide();
            }
        }
    });

    $("form#queryform").submit(function() {
        $('#output-message').html("");
        $.post("/", $("form#queryform").serialize(), function(data) {

            var resSet = 0;
            var resPattern = /<h4>Results:<\/h4>/g;
            var durPattern = /<PRE>Duration/g;
            var resultCount = data.match(resPattern);

            if (!resPattern.test(data)) {
                $('#output-message').html(data);
            } else { 
                if (resultCount.length <= 1) {
                    $('#output-message').html(data);
                } else {
                    var splitData = data.split('<PRE>Duration');
                    var results = splitData[0].split('<h4>');
                    var components = results.slice(1, results.length);
                    var sections = components.length / resultCount.length;
                    
                    for (resSet = 0; resSet < resultCount.length; resSet++) {

                        $('#output-message').append('<h4>' + components[(resSet+1)*sections - 1]);

                        if (sections > 1) {
                            var resNum = resSet + 1;
                            $('<button/>')
                                .attr("class", "btn")
                                .attr("data-toggle", "collapse")
                                .attr("data-target", "#collapse" + resSet)
                                .css("margin-bottom", "1em")
                                .html('Result Plan #' + resNum + '<span id="ibtn' + resSet + '" class="icon icon-chevron-down"></span>')
                                .appendTo('#output-message');
                        
                            $('<div/>')
                                .attr("id", "collapse" + resSet)
                                .attr("class", "collapse in")
                                .appendTo('#output-message');
                        
                            for (var c = 0; c < sections - 1; c++) {
                                var pos = resSet*sections + c;
                                $('#collapse' + resSet).append('<h4>' + components[pos]);
                            }

                            $('#collapse' + resSet).on('show', function() {
                                $("#ibtn" + resSet).removeClass("icon-chevron-down").addClass("icon-chevron-up");
                            }).on('hide', function() {
                                $("#ibtn" + resSet).removeClass("icon-chevron-up").addClass("icon-chevron-down");
                            });

			    $('#output-message').append("<hr/>");
                        }

                    }
                    $('#output-message').append('<PRE>Duration' + splitData[1]);
                }

            }

            var contentString = data.toString();
            if (contentString.indexOf("<PRE>Duration") !== -1) {
                $('<div/>')
                    .addClass("alert alert-success")
                    .html("Success: Query Complete")
                    .appendTo('#output-message');
            }
        });
        return false;
    });
});
</script>

<meta charset=utf-8 />
<title>AsterixDB Web Interface</title>
</head>

<body>
  <div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>

        <!-- Temporary logo placeholder -->
        <a class="brand" href="#"><img src="/webui/static/img/finalasterixlogo.png"></a>
        
        <div class="nav-collapse collapse">
          <ul class="nav">
            <li><a href="http://code.google.com/p/asterixdb/" target="_blank">
                    Open source<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li>
            <li><a href="http://code.google.com/p/asterixdb/issues/list" target="_blank">
                    File issues<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li>
            <li><a href="https://groups.google.com/forum/?fromgroups#!forum/asterixdb-users" target="_blank">
                    Contact<img class="extarget" src="/webui/static/img/targetlink.png"/></a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
  </div>

  <div class="content">
    <div class="container">
      <div class="row-fluid">

        <div class="span6">

          <form id="queryform" class="form-horizontal" method="post">
            <div style="margin-bottom: 1em;">
              <label class="query">Query</label>
              <textarea rows="10" id="qry" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea>
            </div>
            
          <div class="btn-group">
            <button id="checkboxes-on" class="btn"><i id="opts" class="icon-ok" ></i>Select Options</button>
            <button id="clear-query-button" class="btn">Clear Query</button>
            <!-- <button id="checkboxes-off" class="btn">Clear All Options</button> -->
            <button type="submit" id="run-btn" class="btn btn-custom-darken">Run</button>
          </div>

            <div>
              <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-expr-tree" value="true" /> Print parsed expressions</label>
              <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-rewritten-expr-tree" value="true" /> Print rewritten expressions</label>
              <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-logical-plan" value="true" /> Print logical plan</label>
              <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-optimized-logical-plan" value="true" /> Print optimized logical plan</label>
              <label class="checkbox optlabel"><input type="checkbox" checked="checked" name="print-job" value="true" /> Print Hyracks job</label>
            </div>
          </form>
       </div>

       <div class="span6">
         <div class="output">
           <label class="heading">Output</label>
           <div id="output-message" class="message">
           </div>
         </div>
       </div>

      </div>
    </div>
</div>
  <div class="footer">
    <section class="line"><hr></section>
    <section class="content">
      <section class="left">
      </section>
      <section class="right">
        &copy; Copyright 2013 University of California, Irvine
      </section>
    </section>
  </div>
</body>
</html>

