<commit_before><sj-spinner [isRunning]="showSpinner"></sj-spinner>

<div class="row">
  <!-- Content -->
  <div class="col col-xs-12">
    <div class="card">
      <div class="card-block">
        <!-- Title -->
        <div class="row">
          <div class="col col-xs-4"><h4 class="card-title">Custom files</h4></div>
          <div class="col col-xs-8">
            <label [ngClass]="{inProgress:isUploading}" class="btn btn-primary btn-upload pull-right ml-1 mb-1">
              <span *ngIf="!isUploading"><i class="fa fa-upload mr-1"></i>{{path === 'files'?'Uppload file':'Upload jar'}}</span>
              <i *ngIf="isUploading" class="fa fa-spinner fa-spin" aria-hidden="true"></i>
              <input *ngIf="path === 'jars'" type="file" (change)="uploadFile($event)">
              <input *ngIf="path === 'files'" type="button" (click)="UploadFile.show()">
            </label>

            <sj-search-box class="pull-right"
                           (update)="term = $event"></sj-search-box>

            <!--sj-filter class="pull-right" [filterList]="settingsDomains"
                       (update)="domainterm = $event"></sj-filter-->

          </div>
        </div>

        <!-- Alerts -->
        <div class="main-alerts mt-1">
          <alert class="custom-alert"
                 *ngFor="let alert of alerts; let i = index"
                 [type]="alert.type"
                 dismissible="true"
                 [dismissOnTimeout]="alert.timeout"
                 (close)="closeAlert(i)">
            {{ alert.msg }}
          </alert>
        </div>

        <ul class="nav nav-tabs">
          <li class="nav-item">
            <a class="nav-link" [routerLink]="['../jars']" [routerLinkActive]="['active']">Custom Jars</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" [routerLink]="['../files']" [routerLinkActive]="['active']">Custom files</a>
          </li>
        </ul>

        <!-- Files list -->
        <div class="table-wrapper">
          <table class="table table-hover table-sm mt-1 mb-0">
            <thead>
            <tr>
              <th>Name</th>
              <th *ngIf="path === 'files'">Description</th>
              <th *ngIf="path === 'jars'">Version</th>
              <th *ngIf="path === 'files'">Upload date</th>
              <th class="actions-column">Actions</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngIf="!fileList || (fileList && fileList.length === 0)">
              <td colspan="20" class="text-center">No files have been found.</td>
            </tr>

            <!--[ngClass]="{ 'table-info': isSelected(file) }" -->
            <tr *ngFor="let file of fileList | orderBy: 'name' | listFilter : { name: term}">
              <td>{{file.name}}</td>
              <td *ngIf="path === 'files'">{{file.description}}</td>
              <td *ngIf="path === 'jars'">{{file.version}}</td>
              <td *ngIf="path === 'files'">{{file['upload-date']}}</td>
              <td class="actions-column">
                <button type="button"
                        class="btn btn-sm btn-secondary"
                        title="Download file"
                        (click)="downloadFile(file)">
                  <i class="fa fa-download"></i>
                </button>
                <button type="button"
                        class="btn btn-sm btn-secondary"
                        title="Delete file"
                        (click)="deleteFileConfirm(DeleteFile, file)">
                  <i class="fa fa-trash"></i>
                </button>
              </td><commit_msg>-- refactoring<commit_after><sj-spinner [isRunning]="showSpinner"></sj-spinner>

<div class="row">
  <!-- Content -->
  <div class="col col-xs-12">
    <div class="card">
      <div class="card-block">
        <!-- Title -->
        <div class="row">
          <div class="col col-xs-4"><h4 class="card-title">Custom files</h4></div>
          <div class="col col-xs-8">
            <label [ngClass]="{inProgress:isUploading}" class="btn btn-primary btn-upload pull-right ml-1 mb-1">
              <span *ngIf="!isUploading"><i class="fa fa-upload mr-1"></i>{{path === 'files'?'Uppload file':'Upload jar'}}</span>
              <i *ngIf="isUploading" class="fa fa-spinner fa-spin" aria-hidden="true"></i>
              <input *ngIf="path === 'jars'" type="file" (change)="uploadFile($event)">
              <input *ngIf="path === 'files'" type="button" (click)="UploadFile.show()">
            </label>

            <sj-search-box class="pull-right"
                           (update)="term = $event"></sj-search-box>

            <!--sj-filter class="pull-right" [filterList]="settingsDomains"
                       (update)="domainterm = $event"></sj-filter-->

          </div>
        </div>

        <!-- Alerts -->
        <div class="main-alerts mt-1">
          <alert class="custom-alert"
                 *ngFor="let alert of alerts; let i = index"
                 [type]="alert.type"
                 dismissible="true"
                 [dismissOnTimeout]="alert.timeout"
                 (close)="closeAlert(i)">
            {{ alert.msg }}
          </alert>
        </div>

        <ul class="nav nav-tabs">
          <li class="nav-item">
            <a class="nav-link" [routerLink]="['../jars']" [routerLinkActive]="['active']">Custom Jars</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" [routerLink]="['../files']" [routerLinkActive]="['active']">Custom files</a>
          </li>
        </ul>

        <!-- Files list -->
        <div class="table-wrapper">
          <table class="table table-hover table-sm mt-1 mb-0">
            <thead>
            <tr>
              <th>Name</th>
              <th *ngIf="path === 'files'">Description</th>
              <th *ngIf="path === 'jars'">Version</th>
              <th *ngIf="path === 'files'">Upload date</th>
              <th class="actions-column">Actions</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngIf="!fileList || (fileList && fileList.length === 0)">
              <td colspan="20" class="text-center">No files have been found.</td>
            </tr>
            <tr *ngFor="let file of fileList | orderBy: 'name' | listFilter : { name: term}">
              <td>{{file.name}}</td>
              <td *ngIf="path === 'files'">{{file.description}}</td>
              <td *ngIf="path === 'jars'">{{file.version}}</td>
              <td *ngIf="path === 'files'">{{file['upload-date']}}</td>
              <td class="actions-column">
                <button type="button"
                        class="btn btn-sm btn-secondary"
                        title="Download file"
                        (click)="downloadFile(file)">
                  <i class="fa fa-download"></i>
                </button>
                <button type="button"
                        class="btn btn-sm btn-secondary"
                        title="Delete file"
                        (click)="deleteFileConfirm(DeleteFile, file)">
                  <i class="fa fa-trash"></i>
                </button>
              </td>
{'fraction_non_alphanumeric': 0.19367423714644003, 'fraction_numerical': 0.004180019506757698, 'mean_word_length': 1.6713807219947898, 'pattern_counts': {'":': 0, '<': 176, '<?xml version=': 0, '>': 176, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7389876', 'n_tokens_mistral': 2166, 'n_tokens_neox': 2069, 'n_words': 395}