anchor.diff:    var params = <%= raw blazer_json_escape(variable_params.to_json) %>;
     var previewStatement = <%= raw blazer_json_escape(Hash[Blazer.data_sources.map { |k, v| [k, v.preview_statement] }].to_json) %>;
   
  -  $("#run").click(function (e) {
  +
  +  function queryDone() {
  +    $("#run").removeClass("hide")
  +    $("#cancel").addClass("hide")
  +    if (xhr) {
  +      xhr.abort()
  +    }
  +  }
  +
  +  $("#cancel").click( function (e) {
  +    e.preventDefault()
  +
  +    queryDone()
  +
  +    $("#results").html("")
  +  })
  +
  +  $("#run").click( function (e) {
       e.preventDefault();
  +
  +    $(this).addClass("hide")
  +    $("#cancel").removeClass("hide")
   
       if (error_line) {
         editor.getSession().removeGutterDecoration(error_line - 1, "error");
  
positive.code:           updatePreviewSelect();
            $("#query_data_source").selectize().change(updatePreviewSelect);
          </script>
          <%= link_to "Run", "#", class: "btn btn-info", id: "run", style: "vertical-align: top;" %>
        </div>
      </div>
      <div class="col-xs-4">
  
negative.code:     }
  
      $("#results").html('<p class="text-muted">Loading...</p>');
  
      var data = $.extend({}, params, {statement: getSQL(), data_source: $("#query_data_source").val()});
  
      xhr = runQuery(data, function (data) {
        queryDone()
  
        $("#results").html(data);
  
        error_line = getErrorLine();
  