<commit_before><div class="header">
  <ul class="nav nav-pills pull-right">
    <li class="active"><a ng-href="#/queries">{{ 'QUERIES' | translate }}</a></li>
    <li><a ng-href="#/databaseConnections">{{ 'DATABASE_CONNECTIONS' | translate }}</a></li>
  </ul>
  <h3 class="text-muted">ZenQuery</h3>
</div>

<div class="row">
  <div class="col-lg-12">
    <h4>{{ 'QUERIES' | translate }}</h4>
    <table ng-table="tableParams" class="table table-striped table-bordered table-hover">
      <thead>
        <tr>
          <th>{{ 'CONTENT' | translate }}</th>
          <th></th>
          <th ng-show="configuration.deleteAllowed"></th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <td ng-show="configuration.deleteAllowed">&nbsp;</td>
          <td><strong>{{ 'TOTAL' | translate }}</strong></td>
          <td><strong>{{ total }}</strong></td>
        </tr>
      </tfoot>
      <tbody>
        <tr ng-repeat="query in queries" ng-class="{ success : $index == selectedRow }">
          <td>{{ query.content.substring(0, 300) + (query.content.length > 300 ? ' ...' : '') }}</td>
          <td>
            <button type="submit" class="btn btn-info" ng-click="selectRow($index); showDetails(query.id)">{{ 'DETAILS' | translate }}</button>
          </td>
          <td ng-show="configuration.deleteAllowed">
            <button type="submit" class="btn btn-danger" ng-click="delete(query.id)">{{ 'DELETE' | translate }}</button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

<div class="row">
  <div class="col-lg-12">
    <h4>{{ 'DETAILS' | translate }}</h4>
    <form role="form">
  		<div class="form-group">
  			<select id="databaseConnection" name="databaseConnection" style="width: 100%;" ui-select2 ng-model="query.databaseConnectionId" data-placeholder="{{ 'DATABASE_CONNECTION'| translate }}" ng-required="true">
  				<option value=""></option>
  				<option ng-repeat="databaseConnection in databaseConnections" value="{{ databaseConnection.id }}">{{ databaseConnection.name }}</option>
  			</select>
  		</div>
  		<div class="form-group">
  			<label for="content">{{ 'CONTENT' | translate }}</label>
  			<textarea id="content" class="form-control" rows="10" ng-model="queryVersion.content"></textarea>
  		</div>
  		<button type="submit" class="btn btn-primary" ng-hide="query.id" ng-click="create()">{{ 'CREATE' | translate }}</button>
      <button type="submit" class="btn btn-primary" ng-show="query.id" ng-click="update()">{{ 'EXECUTE' | translate }}</button>
  		<button type="submit" class="btn btn-default" ng-show="query.id" ng-click="update()">{{ 'UPDATE' | translate }}</button>
  		<button type="submit" class="btn btn-success" ng-show="query.id" ng-click="new()">{{ 'NEW' | translate }}</button>
      <div id="previousVersions" class="form-group" ng-show="queryVersions.length > 0" style="padding-left: 10px;">
        <select style="width: 60%;" ui-select2 ng-change="loadPreviousVersion(previousQueryVersionContent)" ng-model="previousQueryVersionContent" data-placeholder="{{ 'PREVIOUS_VERSIONS' | translate }}" ng-selected="string">
          <option value=""></option>
          <option ng-repeat="previousQueryVersion in queryVersions" value="{{ previousQueryVersion.content }}">{{ previousQueryVersion.id }}: {{ previousQueryVersion.content.substring(0, 40) + (previousQueryVersion.content.length > 40 ? ' ...' : '') }}</option>
        </select>
      </div>
    </form>
  </div>
</div><commit_msg>Mandatory fields added<commit_after><div class="header">
  <ul class="nav nav-pills pull-right">
    <li class="active"><a ng-href="#/queries">{{ 'QUERIES' | translate }}</a></li>
    <li><a ng-href="#/databaseConnections">{{ 'DATABASE_CONNECTIONS' | translate }}</a></li>
  </ul>
  <h3 class="text-muted">ZenQuery</h3>
</div>

<div class="row">
  <div class="col-lg-12">
    <h4>{{ 'QUERIES' | translate }}</h4>
    <table ng-table="tableParams" class="table table-striped table-bordered table-hover">
      <thead>
        <tr>
          <th>{{ 'CONTENT' | translate }}</th>
          <th></th>
          <th ng-show="configuration.deleteAllowed"></th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <td ng-show="configuration.deleteAllowed">&nbsp;</td>
          <td><strong>{{ 'TOTAL' | translate }}</strong></td>
          <td><strong>{{ total }}</strong></td>
        </tr>
      </tfoot>
      <tbody>
        <tr ng-repeat="query in queries" ng-class="{ success : $index == selectedRow }">
          <td>{{ query.content.substring(0, 300) + (query.content.length > 300 ? ' ...' : '') }}</td>
          <td>
            <button type="submit" class="btn btn-info" ng-click="selectRow($index); showDetails(query.id)">{{ 'DETAILS' | translate }}</button>
          </td>
          <td ng-show="configuration.deleteAllowed">
            <button type="submit" class="btn btn-danger" ng-click="delete(query.id)">{{ 'DELETE' | translate }}</button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

<div class="row">
  <div class="col-lg-12">
    <h4>{{ 'DETAILS' | translate }}</h4>
    <form role="form">
  		<div class="form-group">
  			<select id="databaseConnection" name="databaseConnection" style="width: 100%;" ui-select2 ng-model="query.databaseConnectionId" data-placeholder="{{ 'DATABASE_CONNECTION'| translate }}" ng-required="true">
  				<option value=""></option>
  				<option ng-repeat="databaseConnection in databaseConnections" value="{{ databaseConnection.id }}">{{ databaseConnection.name }}</option>
  			</select>
  		</div>
  		<div class="form-group">
  			<label for="content">{{ 'CONTENT' | translate }}</label>
  			<textarea id="content" class="form-control" rows="10" ng-model="queryVersion.content" required="true"></textarea>
  		</div>
  		<button type="submit" class="btn btn-primary" ng-hide="query.id" ng-click="create()">{{ 'CREATE' | translate }}</button>
      <button type="submit" class="btn btn-primary" ng-show="query.id" ng-click="update()">{{ 'EXECUTE' | translate }}</button>
  		<button type="submit" class="btn btn-default" ng-show="query.id" ng-click="update()">{{ 'UPDATE' | translate }}</button>
  		<button type="submit" class="btn btn-success" ng-show="query.id" ng-click="new()">{{ 'NEW' | translate }}</button>
      <div id="previousVersions" class="form-group" ng-show="queryVersions.length > 0" style="padding-left: 10px;">
        <select style="width: 60%;" ui-select2 ng-change="loadPreviousVersion(previousQueryVersionContent)" ng-model="previousQueryVersionContent" data-placeholder="{{ 'PREVIOUS_VERSIONS' | translate }}" ng-selected="string">
          <option value=""></option>
          <option ng-repeat="previousQueryVersion in queryVersions" value="{{ previousQueryVersion.content }}">{{ previousQueryVersion.id }}: {{ previousQueryVersion.content.substring(0, 40) + (previousQueryVersion.content.length > 40 ? ' ...' : '') }}</option>
        </select>
      </div>
    </form>
  </div>
</div>
{'fraction_non_alphanumeric': 0.2100071479628306, 'fraction_numerical': 0.009721229449606862, 'mean_word_length': 3.5252263906856403, 'pattern_counts': {'":': 0, '<': 199, '<?xml version=': 0, '>': 205, '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': '7183073', 'n_tokens_mistral': 2338, 'n_tokens_neox': 2237, 'n_words': 444}