<commit_before><page-header title='{{alert.name || getDefaultName() || "New" }}'>
</page-header>

<div class="container">
  <email-settings-warning function="alert emails"></email-settings-warning>

  <div class="container">
    <div class="row bg-white p-10">
      <div class="col-md-8">
        <form name="alertForm" ng-submit="saveChanges()" class="form">
          <div class="form-group">
            <label>Query</label>
            <ui-select ng-model="alert.query" reset-search-input="false" on-select="onQuerySelected($item)">
              <ui-select-match placeholder="Search a query by name">{{$select.selected.name}}</ui-select-match>
              <ui-select-choices repeat="q in queries"
                                 refresh="searchQueries($select.search)"
                                 refresh-delay="0">
                <div ng-bind-html="q.name | highlight: $select.search | trustAsHtml"></div>
              </ui-select-choices>
            </ui-select>
          </div>

          <div class="form-group" ng-show="selectedQuery">
            <label>Name</label>
            <input type="string" placeholder="{{getDefaultName()}}" class="form-control" ng-model="alert.name">
          </div>

          <div ng-show="queryResult" class="form-horizontal">
            <div class="form-group">
              <label class="control-label col-md-2">Value column</label>
              <div class="col-md-4">
                <select ng-options="name for name in queryResult.getColumnNames()" ng-model="alert.options.column"
                        class="form-control"></select>
              </div>
              <label class="control-label col-md-2">Value</label>
              <div class="col-md-4">
                <p class="form-control-static">{{queryResult.getData()[0][alert.options.column]}}</p>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2">Op</label>
              <div class="col-md-4">
                <select ng-options="name for name in ops" ng-model="alert.options.op" class="form-control"></select>
              </div>
              <label class="control-label col-md-2">Reference</label>
              <div class="col-md-4">
                <input type="number" class="form-control" ng-model="alert.options.value" placeholder="reference value"
                       required/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2">Rearm seconds</label>
              <div class="col-md-4">
                <input type="number" class="form-control" ng-model="alert.rearm"/>
              </div>
            </div>
          </div>

          <div class="form-group">
            <button class="btn btn-primary" ng-disabled="!alertForm.$valid">Save</button>
          </div>
        </form>
      </div>
      <div class="col-md-4" ng-if="alert.id">
        <alert-subscriptions alert-id="alertId"></alert-subscriptions>
      </div>
    </div>
  </div>
</div>
<commit_msg>Fix: allow non integers in alert reference value<commit_after><page-header title='{{alert.name || getDefaultName() || "New" }}'>
</page-header>

<div class="container">
  <email-settings-warning function="alert emails"></email-settings-warning>

  <div class="container">
    <div class="row bg-white p-10">
      <div class="col-md-8">
        <form name="alertForm" ng-submit="saveChanges()" class="form">
          <div class="form-group">
            <label>Query</label>
            <ui-select ng-model="alert.query" reset-search-input="false" on-select="onQuerySelected($item)">
              <ui-select-match placeholder="Search a query by name">{{$select.selected.name}}</ui-select-match>
              <ui-select-choices repeat="q in queries"
                                 refresh="searchQueries($select.search)"
                                 refresh-delay="0">
                <div ng-bind-html="q.name | highlight: $select.search | trustAsHtml"></div>
              </ui-select-choices>
            </ui-select>
          </div>

          <div class="form-group" ng-show="selectedQuery">
            <label>Name</label>
            <input type="string" placeholder="{{getDefaultName()}}" class="form-control" ng-model="alert.name">
          </div>

          <div ng-show="queryResult" class="form-horizontal">
            <div class="form-group">
              <label class="control-label col-md-2">Value column</label>
              <div class="col-md-4">
                <select ng-options="name for name in queryResult.getColumnNames()" ng-model="alert.options.column"
                        class="form-control"></select>
              </div>
              <label class="control-label col-md-2">Value</label>
              <div class="col-md-4">
                <p class="form-control-static">{{queryResult.getData()[0][alert.options.column]}}</p>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2">Op</label>
              <div class="col-md-4">
                <select ng-options="name for name in ops" ng-model="alert.options.op" class="form-control"></select>
              </div>
              <label class="control-label col-md-2">Reference</label>
              <div class="col-md-4">
                <input type="number" step="any" class="form-control" ng-model="alert.options.value" placeholder="reference value"
                       required/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2">Rearm seconds</label>
              <div class="col-md-4">
                <input type="number" class="form-control" ng-model="alert.rearm"/>
              </div>
            </div>
          </div>

          <div class="form-group">
            <button class="btn btn-primary" ng-disabled="!alertForm.$valid">Save</button>
          </div>
        </form>
      </div>
      <div class="col-md-4" ng-if="alert.id">
        <alert-subscriptions alert-id="alertId"></alert-subscriptions>
      </div>
    </div>
  </div>
</div>

{'fraction_non_alphanumeric': 0.16941480763013256, 'fraction_numerical': 0.005172971225347559, 'mean_word_length': 1.930838465182378, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 0, '>': 153, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2209292', 'n_tokens_mistral': 1768, 'n_tokens_neox': 1730, 'n_words': 310}