<commit_before><div class="batch-wrapper">
  <div class="row">
    <div class="col-md-6">
      <h3>In Progress Batches</h3>
      <div cam-widget-loader
           loading-state="{{ ctrl.getLoadingState('runtime') }}"
           text-empty="No running batches">

        <table class="cam-table">
          <thead>
            <tr>
              <th class="id">ID</th>
              <th class="type">Type</th>
              <th class="failed">Failed Jobs</th>
              <th>Progress</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="batch in ctrl.getBatches('runtime')" ng-class="{selected: ctrl.isSelected(batch)}">
              <td class="uuid"><a ng-href="#/batch?details={{batch.id}}&type=runtime">{{batch.id}}</a></td>
              <td class="type">{{batch.type}}</td>
              <td class="failed">{{ ctrl.getProgressAbsolute(batch, 'failed') }}</td>
              <td>
                <progress>
                  <div class="processed">{{ ctrl.getProgressRoundedPercentage(batch, 'success') }}%</div>
                  <bar value="ctrl.getProgressPercentage(batch, 'success')"
                       type="success"
                       ng-if="ctrl.getProgressAbsolute(batch, 'success') > 0"
                       class="jobs jobs-success">
                  </bar>
                </progress>
              </td>
            </tr>
          </tbody>
        </table>
        <pagination ng-if="ctrl.getBatchCount('runtime') > ctrl.getPageSize()"
                    class="pagination-sm"

                    page="ctrl.getCurrentPage('runtime')"
                    ng-model="ctrl._batches.runtime.currentPage"
                    ng-change="ctrl.updatePage('runtime')"

                    total-items="ctrl.getBatchCount('runtime')"
                    items-per-page="ctrl.getPageSize()"

                    max-size="7"
                    boundary-links="true"></pagination>
      </div>

      <h3>Ended Batches</h3>

      <div cam-widget-loader
           loading-state="{{ ctrl.getLoadingState('history') }}"
           text-empty="No finished batches">

        <table class="cam-table">
          <thead>
            <tr>
              <th class="id">ID</th>
              <th class="type">Type</th>
              <th class="start-time">Started</th>
              <th class="end-time">Ended</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="batch in ctrl.getBatches('history')" ng-class="{selected: ctrl.isSelected(batch)}">
              <td class="uuid"><a ng-href="#/batch?details={{batch.id}}&type=history">{{batch.id}}</a></td>
              <td>{{batch.type}}</td>
              <td>{{batch.startTime}}</td>
              <td>{{batch.endTime}}</td>
            </tr>
          </tbody>
        </table>
        <pagination ng-if="ctrl.getBatchCount('history') > ctrl.getPageSize()"
                    class="pagination-sm"

                    page="ctrl.getCurrentPage('history')"
                    ng-model="ctrl._batches.history.currentPage"
                    ng-change="ctrl.updatePage('history')"

                    total-items="ctrl.getBatchCount('history')"
                    items-per-page="ctrl.getPageSize()"

                    max-size="7"
                    boundary-links="true"></pagination>
      </div>
    </div>

    <div class="col-md-6">
      <div cam-widget-loader
           loading-state="{{ ctrl.getLoadingState('selection') }}"
           text-error="{{ctrl.getSelection()}}">
        <!-- The check below is needed, because you cannot combine ng-if with transclusion in the loader widget. Thanks Angular -->
        <div ng-if="ctrl.getLoadingState('selection') == 'LOADED'">
          <div class="row"
               ng-init="selection = ctrl.getSelection()">
            <h3 class="col-xs-8">
              <span ng-if="ctrl.getSelectionType() == 'history'">Completed</span>
              <span ng-if="ctrl.getSelectionType() == 'runtime'">In Progress</span> Batch Details
            </h3>

            <div class="col-xs-4 text-right">
              <div class="btn-group batch-controls">
                <a ng-if="ctrl.getSelectionType() == 'runtime'"
                   ng-click="ctrl.toggleSuspension()"
                   class="btn btn-default">
                  <span class="glyphicon"
                        ng-class="ctrl.getSuspendedState() ? 'glyphicon-play' : 'glyphicon-pause'"></span>
                </a>

                <a ng-if="ctrl.getSelectionType() == 'runtime' && ctrl.getJobs().length > 0"
                   class="btn btn-default action-button"
                   ng-click="ctrl.retryAll()"
                   tooltip="Increment Number of Retries for all Failed Jobs">
                  <span class="glyphicon glyphicon-repeat"></span>
                </a>

                <a ng-if="ctrl.getSelectionType() == 'runtime'"
                   class="btn btn-danger action-button"
                   ng-click="ctrl.openDeleteModal()"
                   tooltip="Delete this batch">
                  <span class="glyphicon glyphicon-trash"></span>
                </a>
              </div>
            </div>
          </div>

          <table class="cam-table batch-details">
            <thead>
              <th>Property</th>
              <th>Value</th>
            </thead>
            <tbody>
              <tr ng-repeat="key in ctrl.sortingKeys"
                  ng-if="selection[key] && key !== 'failedJobs'"
                  ng-class="key">
                <td>{{key}}</td>
                <td>{{selection[key]}}
                  <span ng-if="key === 'remainingJobs' && selection.failedJobs"
                        class="failedJobs">(Failed {{ selection.failedJobs }})</span>
                  </td>
              </tr>
            </tbody>
          </table>
          <div ng-if="ctrl.getSelectionType() == 'runtime'">
            <h3>Failed Jobs</h3>
            <div cam-widget-loader
                 loading-state="{{ ctrl.getLoadingState('jobs') }}"
                 text-empty="No failed jobs"
                 text-error="{{ctrl.getJobs()}}">
            <table class="cam-table">
              <thead>
                <tr>
                  <th class="id">ID</th>
                  <th class="type">Exception</th>
                  <th class="action">Actions</th>
                </tr>
              </thead>
              <tbody>
                <tr ng-repeat="job in ctrl.getJobs()">
                  <td class="uuid stack-trace">{{job.id}}</td>
                  <td>
                    {{job.exceptionMessage.substr(0, 120)}}…
                    <div class="text-right">
                      <a ng-href="{{ctrl.getStacktraceUrl(job)}}"
                         target="_blank"
                         tooltip="Open stacktrace in new window">Full stack trace</a>
                    </div>
                  </td>
                  <td>
                    <div class="btn-group btn-group-sm">
                      <a class="btn btn-default action-button"
                         ng-click="ctrl.retryJob(job)"<commit_msg>chore(cockpit/batch): add tooltip to activate/suspend<commit_after><div class="batch-wrapper">
  <div class="row">
    <div class="col-md-6">
      <h3>In Progress Batches</h3>
      <div cam-widget-loader
           loading-state="{{ ctrl.getLoadingState('runtime') }}"
           text-empty="No running batches">

        <table class="cam-table">
          <thead>
            <tr>
              <th class="id">ID</th>
              <th class="type">Type</th>
              <th class="failed">Failed Jobs</th>
              <th>Progress</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="batch in ctrl.getBatches('runtime')" ng-class="{selected: ctrl.isSelected(batch)}">
              <td class="uuid"><a ng-href="#/batch?details={{batch.id}}&type=runtime">{{batch.id}}</a></td>
              <td class="type">{{batch.type}}</td>
              <td class="failed">{{ ctrl.getProgressAbsolute(batch, 'failed') }}</td>
              <td>
                <progress>
                  <div class="processed">{{ ctrl.getProgressRoundedPercentage(batch, 'success') }}%</div>
                  <bar value="ctrl.getProgressPercentage(batch, 'success')"
                       type="success"
                       ng-if="ctrl.getProgressAbsolute(batch, 'success') > 0"
                       class="jobs jobs-success">
                  </bar>
                </progress>
              </td>
            </tr>
          </tbody>
        </table>
        <pagination ng-if="ctrl.getBatchCount('runtime') > ctrl.getPageSize()"
                    class="pagination-sm"

                    page="ctrl.getCurrentPage('runtime')"
                    ng-model="ctrl._batches.runtime.currentPage"
                    ng-change="ctrl.updatePage('runtime')"

                    total-items="ctrl.getBatchCount('runtime')"
                    items-per-page="ctrl.getPageSize()"

                    max-size="7"
                    boundary-links="true"></pagination>
      </div>

      <h3>Ended Batches</h3>

      <div cam-widget-loader
           loading-state="{{ ctrl.getLoadingState('history') }}"
           text-empty="No finished batches">

        <table class="cam-table">
          <thead>
            <tr>
              <th class="id">ID</th>
              <th class="type">Type</th>
              <th class="start-time">Started</th>
              <th class="end-time">Ended</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="batch in ctrl.getBatches('history')" ng-class="{selected: ctrl.isSelected(batch)}">
              <td class="uuid"><a ng-href="#/batch?details={{batch.id}}&type=history">{{batch.id}}</a></td>
              <td>{{batch.type}}</td>
              <td>{{batch.startTime}}</td>
              <td>{{batch.endTime}}</td>
            </tr>
          </tbody>
        </table>
        <pagination ng-if="ctrl.getBatchCount('history') > ctrl.getPageSize()"
                    class="pagination-sm"

                    page="ctrl.getCurrentPage('history')"
                    ng-model="ctrl._batches.history.currentPage"
                    ng-change="ctrl.updatePage('history')"

                    total-items="ctrl.getBatchCount('history')"
                    items-per-page="ctrl.getPageSize()"

                    max-size="7"
                    boundary-links="true"></pagination>
      </div>
    </div>

    <div class="col-md-6">
      <div cam-widget-loader
           loading-state="{{ ctrl.getLoadingState('selection') }}"
           text-error="{{ctrl.getSelection()}}">
        <!-- The check below is needed, because you cannot combine ng-if with transclusion in the loader widget. Thanks Angular -->
        <div ng-if="ctrl.getLoadingState('selection') == 'LOADED'">
          <div class="row"
               ng-init="selection = ctrl.getSelection()">
            <h3 class="col-xs-8">
              <span ng-if="ctrl.getSelectionType() == 'history'">Completed</span>
              <span ng-if="ctrl.getSelectionType() == 'runtime'">In Progress</span> Batch Details
            </h3>

            <div class="col-xs-4 text-right">
              <div class="btn-group batch-controls">
                <a ng-if="ctrl.getSelectionType() == 'runtime' && !ctrl.getSuspendedState()"
                   ng-click="ctrl.toggleSuspension()"
                   class="btn btn-default"
                   tooltip="Suspend Batch">
                  <span class="glyphicon glyphicon-pause"></span>
                </a>

                <a ng-if="ctrl.getSelectionType() == 'runtime' && ctrl.getSuspendedState()"
                   ng-click="ctrl.toggleSuspension()"
                   class="btn btn-default"
                   tooltip="Activate Batch">
                  <span class="glyphicon glyphicon-play"></span>
                </a>

                <a ng-if="ctrl.getSelectionType() == 'runtime' && ctrl.getJobs().length > 0"
                   class="btn btn-default action-button"
                   ng-click="ctrl.retryAll()"
                   tooltip="Increment Number of Retries for all Failed Jobs">
                  <span class="glyphicon glyphicon-repeat"></span>
                </a>

                <a ng-if="ctrl.getSelectionType() == 'runtime'"
                   class="btn btn-danger action-button"
                   ng-click="ctrl.openDeleteModal()"
                   tooltip="Delete this batch">
                  <span class="glyphicon glyphicon-trash"></span>
                </a>
              </div>
            </div>
          </div>

          <table class="cam-table batch-details">
            <thead>
              <th>Property</th>
              <th>Value</th>
            </thead>
            <tbody>
              <tr ng-repeat="key in ctrl.sortingKeys"
                  ng-if="selection[key] && key !== 'failedJobs'"
                  ng-class="key">
                <td>{{key}}</td>
                <td>{{selection[key]}}
                  <span ng-if="key === 'remainingJobs' && selection.failedJobs"
                        class="failedJobs">(Failed {{ selection.failedJobs }})</span>
                  </td>
              </tr>
            </tbody>
          </table>
          <div ng-if="ctrl.getSelectionType() == 'runtime'">
            <h3>Failed Jobs</h3>
            <div cam-widget-loader
                 loading-state="{{ ctrl.getLoadingState('jobs') }}"
                 text-empty="No failed jobs"
                 text-error="{{ctrl.getJobs()}}">
            <table class="cam-table">
              <thead>
                <tr>
                  <th class="id">ID</th>
                  <th class="type">Exception</th>
                  <th class="action">Actions</th>
                </tr>
              </thead>
              <tbody>
                <tr ng-repeat="job in ctrl.getJobs()">
                  <td class="uuid stack-trace">{{job.id}}</td>
                  <td>
                    {{job.exceptionMessage.substr(0, 120)}}…
                    <a ng-href="{{ctrl.getStacktraceUrl(job)}}"
                       target="_blank"
                       tooltip="Open stacktrace in new window">Full stack trace</a>
                  </td>
                  <td>
                    <div class="btn-group btn-group-sm">
                      <a class="btn btn-default action-button"
                         ng-click="ctrl.retryJob(job)"
{'fraction_non_alphanumeric': 0.15848459845984597, 'fraction_numerical': 0.0027502750275027505, 'mean_word_length': 1.471537807986406, 'pattern_counts': {'":': 0, '<': 309, '<?xml version=': 0, '>': 315, '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': '4673237', 'n_tokens_mistral': 4118, 'n_tokens_neox': 3819, 'n_words': 658}