Create policy module
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / policy-control / policy-instance-dialog.component.html
diff --git a/webapp-frontend/src/app/policy-control/policy-instance-dialog.component.html b/webapp-frontend/src/app/policy-control/policy-instance-dialog.component.html
deleted file mode 100644 (file)
index 76a9ae0..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<!--
-  ========================LICENSE_START=================================
-  O-RAN-SC
-  %%
-  Copyright (C) 2019 Nordix Foundation
-  %%
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  ========================LICENSE_END===================================
-  -->
-
-<div class="text-muted logo" fxLayout="row" fxLayoutGap="50px" fxLayoutAlign="space-around center">
-    <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" />
-        <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>
-        </svg>
-    </div>
-</div>
-
-<div class="text-muted" *ngIf="jsonSchemaObject.description">{{jsonSchemaObject.description}}</div>
-
-<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" 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" [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')">
-            <mat-icon matTooltip="Properties">{{isVisible.form ? 'expand_less' : 'expand_more'}}</mat-icon>
-            Properties
-        </h4>
-        <div *ngIf="isVisible.form" class="json-schema-form" [@expandSection]="true">
-            <div *ngIf="!formActive">{{jsonFormStatusMessage}}</div>
-
-            <json-schema-form *ngIf="formActive" loadExternalAssets="true" [form]="jsonSchemaObject"
-                [(data)]="jsonObject" [options]="jsonFormOptions" [framework]="'material-design'" [language]="'en'"
-                (onChanges)="onChanges($event)" (onSubmit)="onSubmit($event)" (isValid)="isValid($event)"
-                (validationErrors)="validationErrors($event)">
-            </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>
-        <hr />
-        <h4 [class.text-danger]="!formIsValid && !isVisible.json" [class.default-cursor]="formIsValid || isVisible.json"
-            (click)="toggleVisible('json')">
-            <mat-icon matTooltip="Json">{{isVisible.json ? 'expand_less' : 'expand_more'}}</mat-icon>
-            Json
-        </h4>
-        <div *ngIf="isVisible.json" fxLayout="column" [@expandSection]="true">
-            <div>
-                <strong *ngIf="formIsValid || prettyValidationErrors" [class.text-muted]="formIsValid"
-                    [class.text-danger]="!formIsValid">
-                    {{formIsValid ? 'Json' : 'Not valid'}}
-                </strong>
-                <span *ngIf="!formIsValid && !prettyValidationErrors">Invalid form</span>
-                <span *ngIf="prettyValidationErrors">— errors:</span>
-                <div *ngIf="prettyValidationErrors" class="text-danger" [innerHTML]="prettyValidationErrors"></div>
-            </div>
-            <div>
-                <pre [class.text__dark]="this.darkMode">{{prettyLiveFormData}}</pre>
-            </div>
-        </div>
-
-        <h4 class="default-cursor" (click)="toggleVisible('schema')">
-            <mat-icon matTooltip="Json Schema">{{isVisible.schema ? 'expand_less' : 'expand_more'}}</mat-icon>
-            Json Schema
-        </h4>
-        <div *ngIf="isVisible.schema" fxLayout="column" [@expandSection]="true">
-            <strong class="text-muted">Schema</strong>
-            <pre [class.text__dark]="this.darkMode">{{schemaAsString}}</pre>
-        </div>
-    </mat-card>
-</div>
\ No newline at end of file