<commit_before><div class="row page-header">
  <div class="col-md-4">
    <h1>{{appState.get('pageTitle')}}</h1>
  </div>
</div>

<div *ngIf="isLoading" class="loading">
  <div class="loading-bg"></div>
</div>

<div class="col-sm-11 main-full">

    <div class="panel-body">
      <span class="form-horizontal">

        <div *ngIf="successMessage" class="alert alert-success alert-dismissible fade in" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><span [innerHTML]="successMessage"></span></div>
        <div *ngIf="errorMessage" class="alert alert-warning alert-dismissible fade in" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><span [innerHTML]="errorMessage"></span></div>

        <div class="form-group">
          <label for="selectFilterType" class="col-sm-1 control-label">Add filter</label>
          <div class="col-sm-10">
            <select id="selectFilterType" class="form-control" [(ngModel)]="selectedFilterType" (change)="addFilter()">
              <option *ngFor="let filterType of filterTypes" [ngValue]="filterType">{{filterType.name}}</option>
            </select>
          </div>
          <div class="col-sm-1">
              <button type="button" class="btn btn-default" [attr.disabled]="selectedFilterType ? null : ''" (click)="addFilter()">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
              </button>
          </div>
        </div>

        <ng-container *ngIf="filters.length > 0">
          <div class="form-group" *ngFor="let filter of filters; let i=index">
            <label class="col-sm-1 control-label"></label>
            <div class="col-sm-4">
              <input class="form-control" disabled type="text" value="{{filter.name}}">
            </div>
            <ng-container *ngIf="filter.type === 'SpecialFilterType'">
              <div class="col-sm-6"></div>
            </ng-container>
            <ng-container *ngIf="filter.type !== 'SpecialFilterType'">
              <div class="col-sm-2">
                <select id="selectFilterComp" class="form-control" [attr.disabled]="filter.compOptions.length == 1 ? '' : null" [(ngModel)]="filter.comp">
                  <option *ngFor="let compOption of filter.compOptions" [ngValue]="compOption.name">{{compOption.displayName}}</option>
                </select>
              </div>
              <ng-container *ngIf="filter.type !== 'DateType'">
                <div class="col-sm-4" *ngIf="filter.type !== 'booleanType' && filter.type !== 'ENUM_TYPE'">
                  <input class="form-control" attr.list="list{{i}}" type="text" [(ngModel)]="filter.val">
                  <datalist attr.id="list{{i}}">
                    <option *ngFor="let filterValueOption of filter.valOptions">{{filterValueOption}}</option>
                  </datalist>
                </div>
                <div class="col-sm-4" *ngIf="filter.type === 'booleanType' || filter.type === 'ENUM_TYPE'">
                  <select class="form-control" [(ngModel)]="filter.val">
                    <option *ngFor="let filterValueOption of filter.valOptions">{{filterValueOption}}</option>
                  </select>
                </div>
              </ng-container>
              <div class="col-sm-4" *ngIf="filter.type === 'DateType'">
                <div class="input-group date datepicker">
                  <input type="text" class="form-control" #datePicker [ngModel]="filter.val"
                         (blur)="filter.val = datePicker.value">
                  <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                </div>
              </div>
            </ng-container>
            <div class="col-sm-1">
              <button type="button" class="btn btn-default" (click)="removeFilter(filter)">
                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
              </button>
            </div>
          </div>
        </ng-container>

        <div class="form-group">
          <div class="col-sm-offset-1 col-sm-11">
            <button type="submit" class="btn btn-primary btn-main" (click)="applyFilters()">Apply filter</button>
            <button type="submit" class="btn btn-danger btn-main" [attr.disabled]="filters.length < 1 ? '' : null" (click)="clearFilters()">Clear filters</button>
            <button class="btn btn-default btn-main" [attr.disabled]="filters.length < 1 ? '' : null" (click)="copyURL()">
              <span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span> Clipboard
            </button>
            <button type="submit" class="btn btn-default btn-main" [attr.disabled]="deployments.length < 1 ? '' : null" (click)="exportCSV()">
              <span class="glyphicon glyphicon-save" aria-hidden="true"></span> Export</button>
            <button type="submit" class="btn btn-default btn-main" [attr.disabled]="editableDeployments() ? null : ''" (click)="showEdit()">
              <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
            </button>
            <ng-container *ngIf="hasPermissionToRequestDeployments">
              <a href="#/deployment/">
                <button type="submit" class="btn btn-default btn-main">
                  <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Create
                </button>
              </a>
            </ng-container>
          </div>
        </div>

        <div class="form-group" *ngIf="deployments.length > 0">
          <div class="col-sm-offset-1 col-sm-11">
            <amw-deployments-list [deployments]="deployments"
                                  [sortCol]="sortCol"
                                  [sortDirection]="sortDirection"
                                  [currentPage]="currentPage"
                                  [lastPage]="lastPage"
                                  [filtersForParam]="filtersForParam"
                                  (selectAllDeployments)='switchDeployments($event)'
                                  (doSort)='sortDeploymentsBy($event)'
                                  (doSetMax)='setMaxResultsPerPage($event)'
                                  (doSetOffset)='setNewOffset($event)'>
              <!--(editDeploymentDate)='changeDeploymentDate($event)'-->
              <!--(doConfirmDeployment)='confirmDeployment($event)'-->
                                  <!--(doCancelDeployment)='cancelDeployment($event)'-->
                                  <!--(doRejectDeployment)='rejectDeployment($event)'-->
            </amw-deployments-list>
          </div>
        </div>

      </span>
    </div>
</div>

<amw-deployments-edit-modal [deployments]="deployments"
                            [deploymentDetailMap]="deploymentDetailMap"
                            [editActions]="editActions"
                            [deploymentDetailMap]="deploymentDetailMap"
                            [selectedEditAction]="selectedEditAction"
                            (doReloadDeployment)='reloadDeployment($event)'>

</amw-deployments-edit-modal><commit_msg>restored possibility to confirm/cancel/reject functionality from amw-deployment-list<commit_after><div class="row page-header">
  <div class="col-md-4">
    <h1>{{appState.get('pageTitle')}}</h1>
  </div>
</div>

<div *ngIf="isLoading" class="loading">
  <div class="loading-bg"></div>
</div>

<div class="col-sm-11 main-full">

    <div class="panel-body">
      <span class="form-horizontal">

        <div *ngIf="successMessage" class="alert alert-success alert-dismissible fade in" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><span [innerHTML]="successMessage"></span></div>
        <div *ngIf="errorMessage" class="alert alert-warning alert-dismissible fade in" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><span [innerHTML]="errorMessage"></span></div>

        <div class="form-group">
          <label for="selectFilterType" class="col-sm-1 control-label">Add filter</label>
          <div class="col-sm-10">
            <select id="selectFilterType" class="form-control" [(ngModel)]="selectedFilterType" (change)="addFilter()">
              <option *ngFor="let filterType of filterTypes" [ngValue]="filterType">{{filterType.name}}</option>
            </select>
          </div>
          <div class="col-sm-1">
              <button type="button" class="btn btn-default" [attr.disabled]="selectedFilterType ? null : ''" (click)="addFilter()">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
              </button>
          </div>
        </div>

        <ng-container *ngIf="filters.length > 0">
          <div class="form-group" *ngFor="let filter of filters; let i=index">
            <label class="col-sm-1 control-label"></label>
            <div class="col-sm-4">
              <input class="form-control" disabled type="text" value="{{filter.name}}">
            </div>
            <ng-container *ngIf="filter.type === 'SpecialFilterType'">
              <div class="col-sm-6"></div>
            </ng-container>
            <ng-container *ngIf="filter.type !== 'SpecialFilterType'">
              <div class="col-sm-2">
                <select id="selectFilterComp" class="form-control" [attr.disabled]="filter.compOptions.length == 1 ? '' : null" [(ngModel)]="filter.comp">
                  <option *ngFor="let compOption of filter.compOptions" [ngValue]="compOption.name">{{compOption.displayName}}</option>
                </select>
              </div>
              <ng-container *ngIf="filter.type !== 'DateType'">
                <div class="col-sm-4" *ngIf="filter.type !== 'booleanType' && filter.type !== 'ENUM_TYPE'">
                  <input class="form-control" attr.list="list{{i}}" type="text" [(ngModel)]="filter.val">
                  <datalist attr.id="list{{i}}">
                    <option *ngFor="let filterValueOption of filter.valOptions">{{filterValueOption}}</option>
                  </datalist>
                </div>
                <div class="col-sm-4" *ngIf="filter.type === 'booleanType' || filter.type === 'ENUM_TYPE'">
                  <select class="form-control" [(ngModel)]="filter.val">
                    <option *ngFor="let filterValueOption of filter.valOptions">{{filterValueOption}}</option>
                  </select>
                </div>
              </ng-container>
              <div class="col-sm-4" *ngIf="filter.type === 'DateType'">
                <div class="input-group date datepicker">
                  <input type="text" class="form-control" #datePicker [ngModel]="filter.val"
                         (blur)="filter.val = datePicker.value">
                  <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                </div>
              </div>
            </ng-container>
            <div class="col-sm-1">
              <button type="button" class="btn btn-default" (click)="removeFilter(filter)">
                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
              </button>
            </div>
          </div>
        </ng-container>

        <div class="form-group">
          <div class="col-sm-offset-1 col-sm-11">
            <button type="submit" class="btn btn-primary btn-main" (click)="applyFilters()">Apply filter</button>
            <button type="submit" class="btn btn-danger btn-main" [attr.disabled]="filters.length < 1 ? '' : null" (click)="clearFilters()">Clear filters</button>
            <button class="btn btn-default btn-main" [attr.disabled]="filters.length < 1 ? '' : null" (click)="copyURL()">
              <span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span> Clipboard
            </button>
            <button type="submit" class="btn btn-default btn-main" [attr.disabled]="deployments.length < 1 ? '' : null" (click)="exportCSV()">
              <span class="glyphicon glyphicon-save" aria-hidden="true"></span> Export</button>
            <button type="submit" class="btn btn-default btn-main" [attr.disabled]="editableDeployments() ? null : ''" (click)="showEdit()">
              <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
            </button>
            <ng-container *ngIf="hasPermissionToRequestDeployments">
              <a href="#/deployment/">
                <button type="submit" class="btn btn-default btn-main">
                  <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Create
                </button>
              </a>
            </ng-container>
          </div>
        </div>

        <div class="form-group" *ngIf="deployments.length > 0">
          <div class="col-sm-offset-1 col-sm-11">
            <amw-deployments-list [deployments]="deployments"
                                  [sortCol]="sortCol"
                                  [sortDirection]="sortDirection"
                                  [currentPage]="currentPage"
                                  [lastPage]="lastPage"
                                  [filtersForParam]="filtersForParam"
                                  (doConfirmDeployment)='confirmDeployment($event)'
                                  (doCancelDeployment)='cancelDeployment($event)'
                                  (doRejectDeployment)='rejectDeployment($event)'
                                  (editDeploymentDate)='changeDeploymentDate($event)'
                                  (selectAllDeployments)='switchDeployments($event)'
                                  (doSort)='sortDeploymentsBy($event)'
                                  (doSetMax)='setMaxResultsPerPage($event)'
                                  (doSetOffset)='setNewOffset($event)'>
            </amw-deployments-list>
          </div>
        </div>
      </span>
    </div>
</div>

<amw-deployments-edit-modal [deployments]="deployments"
                            [deploymentDetailMap]="deploymentDetailMap"
                            [editActions]="editActions"
                            [selectedEditAction]="selectedEditAction"
                            (doReloadDeployment)='reloadDeployment($event)'>

</amw-deployments-edit-modal>
{'fraction_non_alphanumeric': 0.16767579468831706, 'fraction_numerical': 0.003990642631071969, 'mean_word_length': 2.1454230685998703, 'pattern_counts': {'":': 0, '<': 283, '<?xml version=': 0, '>': 281, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3954023', 'n_tokens_mistral': 4143, 'n_tokens_neox': 3933, 'n_words': 666}