Merge "Reroute Enrichment to gateway"
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / policy-control / policy-instance-dialog.component.html
index f0b20bb..a533ed0 100644 (file)
   -->
 
 <div class="text-muted logo" fxLayout="row" fxLayoutGap="50px" fxLayoutAlign="space-around center">
-    <div *ngIf="policyInstanceId">{{policyInstanceId}}</div>
+    <div *ngIf="policyInstanceId">[{{this.ric}}] Instance ID: {{policyInstanceId}}</div>
 </div>
 <div class="mat-elevation-z8 header row" [ngClass]="{'header-dark': darkMode}">
     <div class="logo">
-        <img src="../../assets/oran-logo.png" width="30px" height="30px" style="position: relative; z-index: 50" />
+        <img src="assets/oran-logo.png" width="30px" height="30px" style="position: relative; z-index: 50" />
         <svg class="logo__icon" viewBox="150.3 22.2 1000 50">
             <text class="logo__text" [ngClass]="{'logo__text-dark': darkMode}" font-size="30" font-weight="600"
                 letter-spacing=".1em" transform="translate(149 56)">
+                <tspan *ngIf="!this.policyInstanceId">Create new policy instance of type </tspan>
                 <tspan *ngIf="jsonSchemaObject.title"> {{this.jsonSchemaObject.title}}</tspan>
                 <tspan *ngIf="!jsonSchemaObject.title"> {{this.policyTypeName}}</tspan>
             </text>
 <div [formGroup]="instanceForm" fxLayout="row" fxLayoutAlign="space-around start" fxLayout.lt-sm="column"
     fxLayoutAlign.lt-sm="flex-start center">
 
-
     <mat-card class="card" [ngClass]="{'card-dark': darkMode}">
-
-        <mat-form-field *ngIf="!this.policyInstanceId">
-            <mat-label>Select RIC</mat-label>
-            <mat-select id="ricSelector" formControlName="ricSelector" matInput required [(value)]="this.ric">
-                <mat-option *ngFor="let ric of this.allRics" [value]="ric">
-                    {{ric}}
+        <mat-form-field *ngIf="!this.policyInstanceId" appearance="fill">
+            <mat-select id="ricSelector" formControlName="ricSelector" matInput required [(value)]="this.ric"
+                placeholder="Target"
+                matTooltip="Element where the policy instance resides, e.g. a gNodeB or Near-RT RIC">
+                <mat-option *ngFor="let ric of this.allRics.rics" [value]="ric">
+                    {{ric.ric_id}}
                 </mat-option>
             </mat-select>
+            <div *ngIf="ricSelector.invalid && (ricSelector.dirty || ricSelector.touched)">
+                <div *ngIf="ricSelector.errors.required">
+                    <mat-error role="alert">This field is required.</mat-error>
+                </div>
+            </div>
         </mat-form-field>
 
         <h4 class="default-cursor" (click)="toggleVisible('form')">
@@ -65,9 +70,9 @@
             </json-schema-form>
         </div>
         <hr />
+        <button mat-raised-button (click)="this.onClose()">Close</button>
         <button mat-raised-button (click)="this.onSubmit()" [disabled]="!this.formIsValid || !this.ric"
             class="submitBtn">Submit</button>
-        <button mat-raised-button (click)="this.onClose()">Close</button>
         <hr />
         <h4 [class.text-danger]="!formIsValid && !isVisible.json" [class.default-cursor]="formIsValid || isVisible.json"
             (click)="toggleVisible('json')">