2 ========================LICENSE_START=================================
5 Copyright (C) 2020 Nordix Foundation
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===================================
21 <div class="text-muted logo" fxLayout="row" fxLayoutGap="50px" fxLayoutAlign="space-around center">
22 <div *ngIf="policyInstanceId">{{policyInstanceId}}</div>
24 <div class="mat-elevation-z8 header row" [ngClass]="{'header-dark': darkMode}">
26 <img src="../../assets/oran-logo.png" width="30px" height="30px" style="position: relative; z-index: 50" />
27 <svg class="logo__icon" viewBox="150.3 22.2 1000 50">
28 <text class="logo__text" [ngClass]="{'logo__text-dark': darkMode}" font-size="30" font-weight="600"
29 letter-spacing=".1em" transform="translate(149 56)">
30 <tspan>Policy with no type</tspan>
36 <div class="text-muted">Enter policy statements (JSON).</div>
38 <form [formGroup]="instanceForm" novalidate autocomplete="off">
39 <div mat-dialog-content>
40 <mat-form-field *ngIf="!this.policyInstanceId">
41 <mat-label>Select RIC</mat-label>
42 <mat-select id="ricSelector" formControlName="ricSelector" matInput required [(value)]="this.ric">
43 <mat-option *ngFor="let ric of this.allRics" [value]="ric">
47 <div *ngIf="ricSelector.invalid && (ricSelector.dirty || ricSelector.touched)"
48 class="alert mat-error">
49 <div *ngIf="ricSelector.errors.required">
50 A Ric must be selected.
55 <mat-form-field style="width: 800px;">
56 <mat-label>Policy content</mat-label>
57 <textarea id="policyJsonTextArea" formControlName="policyJsonTextArea" matInput cdkTextareaAutosize
58 cdkAutosizeMinRows="10" required>
60 <div *ngIf="policyJsonTextArea.invalid && (policyJsonTextArea.dirty || policyJsonTextArea.touched)"
61 class="alert mat-error">
62 <div *ngIf="policyJsonTextArea.errors.required">
63 The policy body is required.
65 <div *ngIf="policyJsonTextArea.errors.invalidJson">
66 The policy body must be a valid JSON.
71 <div mat-dialog-actions>
72 <button mat-raised-button (click)="this.onSubmit()" class="submitBtn" [disabled]="!instanceForm.valid">
75 <button mat-raised-button class="mat-raised-button" [mat-dialog-close]="false">Close</button>