<commit_before>@(
  testsSummary: TestsSummaryView, 
  tests: List[TestView], 
  configuration: Configuration, 
  testStatusOpt: Option[TestStatus], 
  nameOpt: Option[String], 
  groupOpt: Option[String],
  canRerun: Boolean, 
  pagination: PaginationData,
  sortOpt: Option[Sort],
  descendingOpt: Option[Boolean])(implicit flash: Flash, request: RequestHeader, globalViewContext: GlobalViewContext)

@scripts = {
  <script src="@routes.Assets.at("javascripts/tests.js")"></script>
  <script src="@routes.Assets.at("javascripts/pass-fail-pie-chart.js")"></script>
  <script src="@routes.Assets.at("javascripts/history-chart.js")"></script>
}

@css = {
  <link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/tests.css")">
}

@testsPaginationWidget = { 
  @paginationWidget(pagination)((page, pageSize) => 
    routes.Application.tests(
      configuration = Some(configuration), 
      status = testStatusOpt, 
      name = nameOpt,
      group = groupOpt, 
      page = Some(page), 
      pageSize = Some(pageSize),
      sort = sortOpt,
      descending = descendingOpt)) 
}

@sortLink(sort: Sort) = {
  @if(sortOpt.getOrElse(Sort.Group) == sort) {
    @if(descendingOpt.getOrElse(false)) {
      <a class="sort-link" href="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = Some(sort))">
        <i class="fa fa-sort-desc"></i>
      </a> 
    } else {
      <a class="sort-link" href="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = Some(sort), descending = Some(true))">
        <i class="fa fa-sort-asc"></i>
      </a> 
    } 
  } else {
    <a class="sort-link" href="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = Some(sort))">
      <i class="fa fa-sort"></i>
    </a> 
  }
}

@main(if(globalViewContext.multipleConfigurationMode) "Tests" + configuration else "Tests", "Tests", scripts = scripts, css = css) {

  <h2><img src="@routes.Assets.at("images/" + testsSummary.ballIcon)"/> Tests</h2>
  
    <div class="row">
    <div class="col-md-9">
      <table style="margin-top: 15px" class="table table-striped table-bordered table-hover">
        @if(globalViewContext.multipleConfigurationMode) {
          <tr>
            <td>Configuration</td>
            <td>
              <form id="configuration-form" action="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = sortOpt, descending = descendingOpt)" method="get">
                @for(name <- nameOpt) { <input name="name" value="@name" type="hidden"/> }<commit_msg>Fix title of Tests page with configuration<commit_after>@(
  testsSummary: TestsSummaryView, 
  tests: List[TestView], 
  configuration: Configuration, 
  testStatusOpt: Option[TestStatus], 
  nameOpt: Option[String], 
  groupOpt: Option[String],
  canRerun: Boolean, 
  pagination: PaginationData,
  sortOpt: Option[Sort],
  descendingOpt: Option[Boolean])(implicit flash: Flash, request: RequestHeader, globalViewContext: GlobalViewContext)

@scripts = {
  <script src="@routes.Assets.at("javascripts/tests.js")"></script>
  <script src="@routes.Assets.at("javascripts/pass-fail-pie-chart.js")"></script>
  <script src="@routes.Assets.at("javascripts/history-chart.js")"></script>
}

@css = {
  <link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/tests.css")">
}

@testsPaginationWidget = { 
  @paginationWidget(pagination)((page, pageSize) => 
    routes.Application.tests(
      configuration = Some(configuration), 
      status = testStatusOpt, 
      name = nameOpt,
      group = groupOpt, 
      page = Some(page), 
      pageSize = Some(pageSize),
      sort = sortOpt,
      descending = descendingOpt)) 
}

@sortLink(sort: Sort) = {
  @if(sortOpt.getOrElse(Sort.Group) == sort) {
    @if(descendingOpt.getOrElse(false)) {
      <a class="sort-link" href="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = Some(sort))">
        <i class="fa fa-sort-desc"></i>
      </a> 
    } else {
      <a class="sort-link" href="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = Some(sort), descending = Some(true))">
        <i class="fa fa-sort-asc"></i>
      </a> 
    } 
  } else {
    <a class="sort-link" href="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = Some(sort))">
      <i class="fa fa-sort"></i>
    </a> 
  }
}

@main(if(globalViewContext.multipleConfigurationMode) "Tests: " + configuration else "Tests", "Tests", scripts = scripts, css = css) {

  <h2><img src="@routes.Assets.at("images/" + testsSummary.ballIcon)"/> Tests</h2>
  
    <div class="row">
    <div class="col-md-9">
      <table style="margin-top: 15px" class="table table-striped table-bordered table-hover">
        @if(globalViewContext.multipleConfigurationMode) {
          <tr>
            <td>Configuration</td>
            <td>
              <form id="configuration-form" action="@routes.Application.tests(configuration = Some(configuration), status = testStatusOpt, name = nameOpt, group = groupOpt, sort = sortOpt, descending = descendingOpt)" method="get">
                @for(name <- nameOpt) { <input name="name" value="@name" type="hidden"/> }
{'fraction_non_alphanumeric': 0.1609546025479993, 'fraction_numerical': 0.0017943656917279742, 'mean_word_length': 3.9240282685512367, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, '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': '3680601', 'n_tokens_mistral': 1768, 'n_tokens_neox': 1715, 'n_words': 338}