Clean up and add license headings
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / policy / no-type-policy-editor / no-type-policy-editor.component.html
1 <!--
2  -
3    ========================LICENSE_START=================================
4    O-RAN-SC
5    %%
6    Copyright (C) 2021: Nordix Foundation
7    %%
8    Licensed under the Apache License, Version 2.0 (the "License");
9    you may not use this file except in compliance with the License.
10    You may obtain a copy of the License at
11
12         http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19    ========================LICENSE_END===================================
20   /
21 -->
22
23 <mat-form-field style="width: 800px;"  appearance="fill">
24     <textarea id="policyJsonTextArea" formControlName="policyJsonTextArea" matInput cdkTextareaAutosize
25         cdkAutosizeMinRows="10" required [value]="this.policyJson" placeholder="Policy properties"
26         matTooltip="The properties of the policy instance, in JSON format" matTooltipPosition="before">
27     </textarea>
28     <div *ngIf="policyJsonTextArea.invalid && (policyJsonTextArea.dirty || policyJsonTextArea.touched)">
29         <div *ngIf="policyJsonTextArea.errors.required">
30             <mat-error role="alert">
31                 This field is required.
32             </mat-error>
33         </div>
34         <div *ngIf="policyJsonTextArea.errors.invalidJson">
35             <mat-error role="alert">
36                 The policy properties must be a valid JSON.
37             </mat-error>
38         </div>
39     </div>
40     <button id="formatButton" (click)="formatJsonInput();" mat-raised-button [disabled]="!policyJsonTextArea.valid">
41         Format JSON
42     </button>
43 </mat-form-field>