<commit_before><!-- modal for archive button -->
<div class="modal fade" id="archive-confirmation-modal" tabindex="-1" role="dialog"
     aria-labelledby="archiveConfirmationModal" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">Query Archive</h4>
      </div>
      <div class="modal-body">
        Are you sure you want to archive this query?
        <br/> All alerts and dashboard widgets created with its visualizations will be deleted.
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
        <button type="button" class="btn btn-danger" ng-click="archiveQuery()">Yes, archive.</button>
      </div>
    </div>
  </div>
</div>
<!-- end of modal for archive button -->

<div class="container">
  <overlay ng-if="canCreateQuery === false">
    You don't have permission to create new queries on any of the data sources available to you. You can either <a
    href="queries">browse existing queries</a>, or ask for additional permissions from your Re:dash admin.
  </overlay>
  <overlay ng-if="noDataSources && currentUser.isAdmin">
    Looks like no data sources were created yet (or none of them available to the group(s) you're member of). Please
    create one first, and then start querying.
    <br/>
    <a href="data_sources/new" class="btn btn-default">Create Data Source</a> <a href="groups" class="btn btn-default">Manage
    Group Permissions</a>
  </overlay>
  <overlay ng-if="noDataSources && !currentUser.isAdmin">
    Looks like no data sources were created yet (or none of them available to the group(s) you're member of). Please ask
    your Re:dash admin to create one first.
  </overlay>

  <alert-unsaved-changes ng-if="canEdit" is-dirty="isDirty"></alert-unsaved-changes>

  <div class="row bg-white p-10 m-b-10">
    <div class="col-sm-9">
      <h3>
        <edit-in-place editable="isQueryOwner" done="saveName" ignore-blanks="true" value="query.name"></edit-in-place>
      </h3>
      <p>
        <em>
          <edit-in-place editable="isQueryOwner"
                         done="saveDescription"
                         editor="textarea"
                         placeholder="No description"
                         ignore-blanks='false'
                         value="query.description"
                         markdown="true">
          </edit-in-place>
        </em>

      <ul class="list-inline m-t-20"><commit_msg>Make create data source button more prominent<commit_after><!-- modal for archive button -->
<div class="modal fade" id="archive-confirmation-modal" tabindex="-1" role="dialog"
     aria-labelledby="archiveConfirmationModal" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">Query Archive</h4>
      </div>
      <div class="modal-body">
        Are you sure you want to archive this query?
        <br/> All alerts and dashboard widgets created with its visualizations will be deleted.
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
        <button type="button" class="btn btn-danger" ng-click="archiveQuery()">Yes, archive.</button>
      </div>
    </div>
  </div>
</div>
<!-- end of modal for archive button -->

<div class="container">
  <overlay ng-if="canCreateQuery === false">
    You don't have permission to create new queries on any of the data sources available to you. You can either <a
    href="queries">browse existing queries</a>, or ask for additional permissions from your Re:dash admin.
  </overlay>
  <overlay ng-if="noDataSources && currentUser.isAdmin">
    Looks like no data sources were created yet (or none of them available to the group(s) you're member of). Please
    create one first, and then start querying.
    <br/>
    <a href="data_sources/new" class="btn btn-primary">Create Data Source</a> <a href="groups" class="btn btn-default">Manage
    Group Permissions</a>
  </overlay>
  <overlay ng-if="noDataSources && !currentUser.isAdmin">
    Looks like no data sources were created yet (or none of them available to the group(s) you're member of). Please ask
    your Re:dash admin to create one first.
  </overlay>

  <alert-unsaved-changes ng-if="canEdit" is-dirty="isDirty"></alert-unsaved-changes>

  <div class="row bg-white p-10 m-b-10">
    <div class="col-sm-9">
      <h3>
        <edit-in-place editable="isQueryOwner" done="saveName" ignore-blanks="true" value="query.name"></edit-in-place>
      </h3>
      <p>
        <em>
          <edit-in-place editable="isQueryOwner"
                         done="saveDescription"
                         editor="textarea"
                         placeholder="No description"
                         ignore-blanks='false'
                         value="query.description"
                         markdown="true">
          </edit-in-place>
        </em>

      <ul class="list-inline m-t-20">
{'fraction_non_alphanumeric': 0.13586530931871574, 'fraction_numerical': 0.004698512137823023, 'mean_word_length': 2.721048798252003, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4862083', 'n_tokens_mistral': 1492, 'n_tokens_neox': 1443, 'n_words': 443}