<h3 id="requestMetrics" jhiTranslate="metrics.jvm.http.title">Pedidos HTTP (eventos por segundo)</h3>

@if (!updating() && requestMetrics()) {
  <table class="table table-striped" aria-describedby="requestMetrics">
    <thead>
      <tr>
        <th scope="col" jhiTranslate="metrics.jvm.http.table.code">Código</th>
        <th scope="col" jhiTranslate="metrics.jvm.http.table.count">Contagem</th>
        <th scope="col" class="text-end" jhiTranslate="metrics.jvm.http.table.mean">Mediana</th>
        <th scope="col" class="text-end" jhiTranslate="metrics.jvm.http.table.max">Max</th>
      </tr>
    </thead>
    <tbody>
      @for (entry of requestMetrics()!['percode'] | keyvalue; track entry.key) {
        <tr>
          <td>{{ entry.key }}</td>
          <td>
            <ngb-progressbar
              [max]="requestMetrics()!['all'].count"
              [value]="entry.value.count"
              [striped]="true"
              [animated]="false"
              type="success"
            >
              <span>{{ entry.value.count }}</span>
            </ngb-progressbar>
          </td>
          <td class="text-end">
            {{ filterNaN(entry.value.mean) | number: '1.0-2' }}
          </td>
          <td class="text-end">{{ entry.value.max | number: '1.0-2' }}</td>
        </tr>
      }
    </tbody>
  </table>
}
