Reorganize dashboard into subfolders
[portal/ric-dashboard.git] / dashboard / webapp-frontend / src / app / ac-xapp / ac-xapp.component.html
1 <!--
2   ========================LICENSE_START=================================
3   O-RAN-SC
4   %%
5   Copyright (C) 2019 AT&T Intellectual Property
6   %%
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
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
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===================================
19   -->
20 <div class="ac__section">
21   <h3 class="rd-global-page-title">Admission Control xApp Policy</h3>
22
23   <form [formGroup]="acForm" novalidate autocomplete="off" (ngSubmit)="updateAc(acForm.value)">
24     <div name="enforce">
25       <mat-checkbox formControlName="enforce">Enforce</mat-checkbox>
26     </div>
27     <mat-form-field class="input-display-block">
28       <input matInput type="text" placeholder="Traffic class" formControlName="class">
29       <mat-hint align="end">Traffic class ID (1-256)</mat-hint>
30       <mat-error *ngIf="validateControl('window_length') && hasError('window_length', 'required')">Number is required
31       </mat-error>
32       <mat-error *ngIf="hasError('window_length', 'pattern')">Valid number is required</mat-error>
33     </mat-form-field>
34     <mat-form-field class="input-display-block">
35       <input matInput type="text" placeholder="Window length" formControlName="window_length">
36       <mat-hint align="end">Sliding window length in minutes (15-300)</mat-hint>
37       <mat-error *ngIf="validateControl('window_length') && hasError('window_length', 'required')">Number is required
38       </mat-error>
39       <mat-error *ngIf="hasError('window_length', 'pattern')">Valid number is required</mat-error>
40     </mat-form-field>
41     <mat-form-field class="input-display-block">
42       <input matInput type="text" placeholder="Blocking rate" formControlName="blocking_rate">
43       <mat-hint align="end">Connections to block when triggered (1-100)</mat-hint>
44       <mat-error *ngIf="validateControl('blocking_rate') && hasError('blocking_rate', 'required')">Number is required
45       </mat-error>
46       <mat-error *ngIf="hasError('blocking_rate', 'pattern')">Valid number is required</mat-error>
47     </mat-form-field>
48     <mat-form-field class="input-display-block">
49       <input matInput type="text" placeholder="Trigger threshold" formControlName="trigger_threshold">
50       <mat-hint align="end">Number of events in window to trigger blocking (min 1)</mat-hint>
51       <mat-error *ngIf="validateControl('trigger_threshold') && hasError('trigger_threshold', 'required')">Number is
52         required</mat-error>
53       <mat-error *ngIf="hasError('trigger_threshold', 'pattern')">Valid number is required</mat-error>
54     </mat-form-field>
55     <div class="input-display-block">
56       <button class="mat-raised-button mat-primary update-button" [disabled]="!acForm.valid">Update</button>
57     </div>
58 </form>
59
60 </div>