2 ========================LICENSE_START=================================
5 Copyright (C) 2019 AT&T Intellectual Property
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ========================LICENSE_END===================================
20 <div class="ac__section">
21 <h3 class="ac__header">AC xApp Policy</h3>
23 <form [formGroup]="acForm" novalidate autocomplete="off" (ngSubmit)="updateAc(acForm.value)">
25 <mat-checkbox formControlName="enforce">Enforce</mat-checkbox>
27 <mat-form-field class="input-display-block">
28 <input matInput type="text" placeholder="Window length" formControlName="window_length">
29 <mat-hint align="end">Sliding window length in minutes for measurement, range 1..60.</mat-hint>
30 <mat-error *ngIf="validateControl('window_length') && hasError('window_length', 'required')">Number is required
32 <mat-error *ngIf="hasError('window_length', 'pattern')">Valid number is required</mat-error>
34 <mat-form-field class="input-display-block">
35 <input matInput type="text" placeholder="Blocking rate" formControlName="blocking_rate">
36 <mat-hint align="end">Connections to block if above trigger threshold, range 1..100.</mat-hint>
37 <mat-error *ngIf="validateControl('blocking_rate') && hasError('blocking_rate', 'required')">Number is required
39 <mat-error *ngIf="hasError('blocking_rate', 'pattern')">Valid number is required</mat-error>
41 <mat-form-field class="input-display-block">
42 <input matInput type="text" placeholder="Trigger threshold" formControlName="trigger_threshold">
43 <mat-hint align="end">Number of events in window to trigger blocking, minimum 1.</mat-hint>
44 <mat-error *ngIf="validateControl('trigger_threshold') && hasError('trigger_threshold', 'required')">Number is
46 <mat-error *ngIf="hasError('trigger_threshold', 'pattern')">Valid number is required</mat-error>
48 <div class="input-display-block">
49 <button class="mat-raised-button mat-primary update-button" [disabled]="!acForm.valid">Update</button>