From: Patrik Buhr Date: Tue, 6 Apr 2021 06:58:01 +0000 (+0000) Subject: Merge "Fix bug in PolicyInstanceDialogComponent" X-Git-Tag: 2.2.0~46 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=41a57e4d75761207f2da883d0e4396c81159e58e;hp=b654bbbe6ccb1638585394cc670deb18d5ef3f75;p=portal%2Fnonrtric-controlpanel.git Merge "Fix bug in PolicyInstanceDialogComponent" --- diff --git a/webapp-frontend/src/app/mock/policies.json b/webapp-frontend/src/app/mock/policies.json index c392b76..286bf49 100644 --- a/webapp-frontend/src/app/mock/policies.json +++ b/webapp-frontend/src/app/mock/policies.json @@ -1,5 +1,6 @@ { "policy_ids": [ - "2100" + "2100", + "2000" ] } \ No newline at end of file diff --git a/webapp-frontend/src/app/mock/policies_notype.json b/webapp-frontend/src/app/mock/policies_notype.json new file mode 100644 index 0000000..1420ec7 --- /dev/null +++ b/webapp-frontend/src/app/mock/policies_notype.json @@ -0,0 +1,5 @@ +{ + "policy_ids": [ + "2001" + ] + } \ No newline at end of file diff --git a/webapp-frontend/src/app/mock/policy-instance-notype-status.json b/webapp-frontend/src/app/mock/policy-instance-notype-status.json new file mode 100644 index 0000000..e213694 --- /dev/null +++ b/webapp-frontend/src/app/mock/policy-instance-notype-status.json @@ -0,0 +1,6 @@ +{ + "last_modified": "2021-01-26T13:15:11.895297Z", + "status": { + "enforceStatus": "UNDEFINED" + } +} \ No newline at end of file diff --git a/webapp-frontend/src/app/policy/policy-control.component.html b/webapp-frontend/src/app/policy/policy-control.component.html index 9aa8341..63f2dab 100644 --- a/webapp-frontend/src/app/policy/policy-control.component.html +++ b/webapp-frontend/src/app/policy/policy-control.component.html @@ -27,57 +27,4 @@ - - - - Policy Type - - {{isInstancesShown(policyTypeSchema) ? 'expand_less' : 'expand_more'}} - - {{this.getDisplayName(policyTypeSchema)}} - - - - - Description - {{policyTypeSchema.schemaObject.description}} - - - - - Action - - - - - - - - - - - - - - - - No records found. - - - - - - - - - - - - -
+ diff --git a/webapp-frontend/src/app/policy/policy-control.component.spec.ts b/webapp-frontend/src/app/policy/policy-control.component.spec.ts index 3cd2601..198305d 100644 --- a/webapp-frontend/src/app/policy/policy-control.component.spec.ts +++ b/webapp-frontend/src/app/policy/policy-control.component.spec.ts @@ -30,6 +30,7 @@ import { PolicyControlComponent } from "./policy-control.component"; import { PolicyTypeDataSource } from "@policy/policy-type/policy-type.datasource"; import { UiService } from "@services/ui/ui.service"; import { PolicyTypeSchema } from "@interfaces/policy.types"; +import { PolicyService } from '../services/policy/policy.service'; describe("PolicyControlComponent", () => { let component: PolicyControlComponent; @@ -40,11 +41,13 @@ describe("PolicyControlComponent", () => { "PolicyTypeDataSource", ["connect", "getPolicyTypes", "disconnect"] ); + const policyServiceSpy = jasmine.createSpyObj('PolicyService', ['getPolicyTypes']); var policyTypeSchema = {} as PolicyTypeSchema; policyTypeSchema.name = ""; policyTypeSchema.schemaObject = ""; policyTypeDataSourceSpy.connect.and.returnValue(of([policyTypeSchema])); policyTypeDataSourceSpy.disconnect(); + policyServiceSpy.getPolicyTypes.and.returnValue(of(["type1"])); let matDialogStub: Partial; let notificationServiceStub: Partial; @@ -54,6 +57,7 @@ describe("PolicyControlComponent", () => { schemas: [CUSTOM_ELEMENTS_SCHEMA], declarations: [PolicyControlComponent], providers: [ + { provide : PolicyService, useValue: policyServiceSpy}, { provide: PolicyTypeDataSource, useValue: policyTypeDataSourceSpy }, { provide: MatDialog, useValue: matDialogStub }, { provide: NotificationService, useValue: notificationServiceStub }, diff --git a/webapp-frontend/src/app/policy/policy-control.component.ts b/webapp-frontend/src/app/policy/policy-control.component.ts index 1c5b7d8..de3f578 100644 --- a/webapp-frontend/src/app/policy/policy-control.component.ts +++ b/webapp-frontend/src/app/policy/policy-control.component.ts @@ -23,11 +23,13 @@ import { MatDialog } from '@angular/material/dialog'; import { BehaviorSubject, Observable } from 'rxjs'; -import { PolicyTypeSchema } from '@interfaces/policy.types'; +import { PolicyTypes, PolicyTypeSchema } from '@interfaces/policy.types'; import { PolicyTypeDataSource } from './policy-type/policy-type.datasource'; import { getPolicyDialogProperties } from './policy-instance-dialog/policy-instance-dialog.component'; import { PolicyInstanceDialogComponent } from './policy-instance-dialog/policy-instance-dialog.component'; import { UiService } from '@services/ui/ui.service'; +import { PolicyService } from '@services/policy/policy.service'; +import { PolicyTypeComponent } from './policy-type/policy-type.component'; class PolicyTypeInfo { constructor(public type: PolicyTypeSchema) { } @@ -51,11 +53,14 @@ class PolicyTypeInfo { export class PolicyControlComponent implements OnInit { policyTypeInfo = new Map(); + policyTypeIds: Array; + policyTypeComponent = new PolicyTypeComponent(this.policyTypesDataSource); darkMode: boolean; constructor( public policyTypesDataSource: PolicyTypeDataSource, private dialog: MatDialog, + private policyService: PolicyService, private ui: UiService) { } ngOnInit() { @@ -63,15 +68,8 @@ export class PolicyControlComponent implements OnInit { this.ui.darkModeState.subscribe((isDark) => { this.darkMode = isDark; }); - } - - createPolicyInstance(policyTypeSchema: PolicyTypeSchema): void { - let dialogRef = this.dialog.open(PolicyInstanceDialogComponent, - getPolicyDialogProperties(policyTypeSchema, null, this.darkMode)); - const info: PolicyTypeInfo = this.getPolicyTypeInfo(policyTypeSchema); - dialogRef.afterClosed().subscribe( - (_) => { - info.isExpanded.next(info.isExpanded.getValue()); + this.policyService.getPolicyTypes().subscribe((policyType: PolicyTypes) => { + this.policyTypeIds = policyType.policytype_ids; } ); } @@ -97,15 +95,12 @@ export class PolicyControlComponent implements OnInit { return '< No type >'; } - isInstancesShown(policyTypeSchema: PolicyTypeSchema): boolean { - return this.getPolicyTypeInfo(policyTypeSchema).isExpanded.getValue(); - } - getExpandedObserver(policyTypeSchema: PolicyTypeSchema): Observable { return this.getPolicyTypeInfo(policyTypeSchema).isExpanded.asObservable(); } refreshTables() { this.policyTypesDataSource.getPolicyTypes(); + this.policyTypeComponent.setIsVisible(false); } } diff --git a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.html b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.html index 9c7032c..8c9f5c5 100644 --- a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.html +++ b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.html @@ -17,12 +17,29 @@ limitations under the License. ========================LICENSE_END=================================== --> +
+ Number of instances: {{this.nbInstances()}} + + +
+ - Instance +
+
+ + + Instance + + +
{{element.policy_id}} @@ -31,7 +48,14 @@ - Target +
+
+ + + Target + + +
{{element.ric_id}} @@ -40,7 +64,14 @@ - Owner +
+
+ + + Owner + + +
{{element.service_id}} @@ -49,7 +80,14 @@ - Last modified +
+
+ + + Last modified + + +
{{toLocalTime(element.lastModified)}} @@ -80,4 +118,4 @@ -
+ \ No newline at end of file diff --git a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts index eb9747d..24a7cc7 100644 --- a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts +++ b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts @@ -18,7 +18,7 @@ * ========================LICENSE_END=================================== */ -import { MatSort } from '@angular/material/sort'; +import { MatSort, Sort } from '@angular/material/sort'; import { Component, OnInit, ViewChild, Input, AfterViewInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { PolicyTypeSchema } from '@interfaces/policy.types'; @@ -31,8 +31,16 @@ import { PolicyInstance } from '@interfaces/policy.types'; import { PolicyInstanceDialogComponent } from '../policy-instance-dialog/policy-instance-dialog.component'; import { getPolicyDialogProperties } from '../policy-instance-dialog/policy-instance-dialog.component'; import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; +import { BehaviorSubject, Observable } from 'rxjs'; import { UiService } from '@services/ui/ui.service'; +import { FormControl, FormGroup } from '@angular/forms'; +import { MatTableDataSource } from '@angular/material/table'; + +class PolicyTypeInfo { + constructor(public type: PolicyTypeSchema) { } + + isExpanded: BehaviorSubject = new BehaviorSubject(false); +} @Component({ selector: 'nrcp-policy-instance', @@ -42,10 +50,13 @@ import { UiService } from '@services/ui/ui.service'; export class PolicyInstanceComponent implements OnInit, AfterViewInit { - instanceDataSource: PolicyInstanceDataSource; + policyInstanceDataSource: PolicyInstanceDataSource; @Input() policyTypeSchema: PolicyTypeSchema; @Input() expanded: Observable; @ViewChild(MatSort, { static: true }) sort: MatSort; + policyTypeInfo = new Map(); + instanceDataSource: MatTableDataSource = new MatTableDataSource(); + policyInstanceForm: FormGroup; darkMode: boolean; constructor( @@ -55,23 +66,62 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { private notificationService: NotificationService, private confirmDialogService: ConfirmDialogService, private ui: UiService) { + this.policyInstanceForm = new FormGroup({ + id: new FormControl(''), + target: new FormControl(''), + owner: new FormControl(''), + lastModified: new FormControl('') + }) } ngOnInit() { - this.instanceDataSource = new PolicyInstanceDataSource(this.policySvc, this.sort, this.policyTypeSchema); + let schemaId = this.policyTypeSchema.id; + if(schemaId.includes('')){ + schemaId = ''; + } + this.policyInstanceDataSource = new PolicyInstanceDataSource(this.policySvc, this.sort, this.notificationService, schemaId); this.expanded.subscribe((isExpanded: boolean) => this.onExpand(isExpanded)); + + this.policyInstanceDataSource.connect().subscribe((data) => { + this.instanceDataSource.data = data; + }) + + this.policyInstanceForm.valueChanges.subscribe(value => { + const filter = {...value, id: value.id.trim().toLowerCase()} as string; + this.instanceDataSource.filter = filter; + }); + + this.instanceDataSource.filterPredicate = ((data: PolicyInstance, filter) => { + return this.isDataIncluding(data.policy_id, filter.id) + && this.isDataIncluding(data.ric_id, filter.target) + && this.isDataIncluding(data.service_id, filter.owner) + && this.isDataIncluding(data.lastModified, filter.lastModified); + }) as (data: PolicyInstance, filter: any) => boolean; + this.ui.darkModeState.subscribe((isDark) => { this.darkMode = isDark; }); } + compare(a: any, b: any, isAsc: boolean) { + return (a < b ? -1 : 1) * (isAsc ? 1 : -1); + } + + stopSort(event: any){ + event.stopPropagation(); + } + + isDataIncluding(data: string, filter: string) : boolean { + return !filter || data.toLowerCase().includes(filter); + } + ngAfterViewInit() { - this.instanceDataSource.sort = this.sort; + this.policyInstanceDataSource.sort = this.sort; } private onExpand(isExpanded: boolean) { if (isExpanded) { - this.instanceDataSource.getPolicyInstances(); + this.policyInstanceDataSource.getPolicyInstances(); } } @@ -87,7 +137,7 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { PolicyInstanceDialogComponent, getPolicyDialogProperties(this.policyTypeSchema, instance, this.darkMode)).afterClosed().subscribe( (_: any) => { - this.instanceDataSource.getPolicyInstances(); + this.policyInstanceDataSource.getPolicyInstances(); } ); }, @@ -98,7 +148,11 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { } hasInstances(): boolean { - return this.instanceDataSource.rowCount > 0; + return this.policyInstanceDataSource.rowCount > 0; + } + + nbInstances(): number { + return this.policyInstanceDataSource.policyInstances.length; } toLocalTime(utcTime: string): string { @@ -108,6 +162,17 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { } + createPolicyInstance(policyTypeSchema: PolicyTypeSchema): void { + let dialogRef = this.dialog.open(PolicyInstanceDialogComponent, + getPolicyDialogProperties(policyTypeSchema, null, this.darkMode)); + const info: PolicyTypeInfo = this.getPolicyTypeInfo(policyTypeSchema); + dialogRef.afterClosed().subscribe( + (_) => { + info.isExpanded.next(info.isExpanded.getValue()); + } + ); + } + deleteInstance(instance: PolicyInstance): void { this.confirmDialogService .openConfirmDialog('Are you sure you want to delete this policy instance?') @@ -120,7 +185,7 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { switch (response.status) { case 204: this.notificationService.success('Delete succeeded!'); - this.instanceDataSource.getPolicyInstances(); + this.policyInstanceDataSource.getPolicyInstances(); break; default: this.notificationService.warn('Delete failed ' + response.status + ' ' + response.body); @@ -132,4 +197,17 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { } }); } + + getPolicyTypeInfo(policyTypeSchema: PolicyTypeSchema): PolicyTypeInfo { + let info: PolicyTypeInfo = this.policyTypeInfo.get(policyTypeSchema.name); + if (!info) { + info = new PolicyTypeInfo(policyTypeSchema); + this.policyTypeInfo.set(policyTypeSchema.name, info); + } + return info; + } + + refreshTable() { + this.policyInstanceDataSource.getPolicyInstances(); + } } diff --git a/webapp-frontend/src/app/policy/policy-instance/policy-instance.datasource.ts b/webapp-frontend/src/app/policy/policy-instance/policy-instance.datasource.ts index 031c0eb..225aabb 100644 --- a/webapp-frontend/src/app/policy/policy-instance/policy-instance.datasource.ts +++ b/webapp-frontend/src/app/policy/policy-instance/policy-instance.datasource.ts @@ -24,8 +24,9 @@ import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { merge } from 'rxjs'; import { map } from 'rxjs/operators'; -import { PolicyInstance, PolicyTypeSchema } from '@interfaces/policy.types'; +import { PolicyInstance } from '@interfaces/policy.types'; import { PolicyService } from '@services/policy/policy.service'; +import { NotificationService } from '@services/ui/notification.service'; export class PolicyInstanceDataSource extends DataSource { @@ -42,16 +43,16 @@ export class PolicyInstanceDataSource extends DataSource { constructor( private policySvc: PolicyService, public sort: MatSort, - private policyTypeSchema: PolicyTypeSchema) { + private notificationService: NotificationService, + private policyTypeSchemaId: string) { super(); } public getPolicyInstances() { this.policyInstances = [] as PolicyInstance[]; - this.policySvc.getPolicyInstancesByType(this.policyTypeSchema.id).subscribe(policies => { + this.policySvc.getPolicyInstancesByType(this.policyTypeSchemaId).subscribe(policies => { if (policies.policy_ids.length != 0) { policies.policy_ids.forEach(policyId => { - var policyInstance = {} as PolicyInstance this.policySvc.getPolicyInstance(policyId).subscribe(policyInstance => { this.policySvc.getPolicyStatus(policyId).subscribe(policyStatus => { policyInstance.lastModified = policyStatus.last_modified; diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.component.html b/webapp-frontend/src/app/policy/policy-type/policy-type.component.html new file mode 100644 index 0000000..6bc273d --- /dev/null +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.component.html @@ -0,0 +1,34 @@ + + +
+
+ {{isVisible.value? 'expand_less' : 'expand_more'}} +
+
+ Policy type: {{policyTypeInfo.type.id}} +
+
+ Description:{{policyTypeInfo.type.schemaObject.description}} +
+
+ + + \ No newline at end of file diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.component.scss b/webapp-frontend/src/app/policy/policy-type/policy-type.component.scss new file mode 100644 index 0000000..26245c9 --- /dev/null +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.component.scss @@ -0,0 +1,19 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2021 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=================================== + */ \ No newline at end of file diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.component.spec.ts b/webapp-frontend/src/app/policy/policy-type/policy-type.component.spec.ts new file mode 100644 index 0000000..4276ad3 --- /dev/null +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.component.spec.ts @@ -0,0 +1,54 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2021 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=================================== + */ + +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PolicyTypeComponent } from './policy-type.component'; +import { PolicyTypeDataSource } from './policy-type.datasource'; +import { PolicyTypeSchema } from '../../interfaces/policy.types'; + +describe('PolicyTypeComponent', () => { + let component: PolicyTypeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + const policyTypeDataSourceSpy = jasmine.createSpyObj('PolicyTypeDataSource', ['getPolicyType']); + const policyTypeSchema = {"schemaObject": {"description": "Type 1 policy type"}} as PolicyTypeSchema; + policyTypeDataSourceSpy.getPolicyType.and.returnValue(policyTypeSchema); + + TestBed.configureTestingModule({ + declarations: [ PolicyTypeComponent ], + providers: [ + { provide: PolicyTypeDataSource, useValue: policyTypeDataSourceSpy } + ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PolicyTypeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts b/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts new file mode 100644 index 0000000..be5b305 --- /dev/null +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts @@ -0,0 +1,63 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2021 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=================================== + */ + +import { Component, Input, OnInit } from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; +import { PolicyTypeSchema } from '@interfaces/policy.types'; +import { PolicyService } from '@services/policy/policy.service'; +import { PolicyTypeDataSource } from './policy-type.datasource'; + +class PolicyTypeInfo { + constructor(public type: PolicyTypeSchema) { } + + isExpanded: BehaviorSubject = new BehaviorSubject(false); +} + +@Component({ + selector: 'nrcp-policy-type', + templateUrl: './policy-type.component.html', + styleUrls: ['./policy-type.component.scss'] +}) +export class PolicyTypeComponent implements OnInit { + + @Input() policyTypeId: string; + + isVisible: BehaviorSubject = new BehaviorSubject(false); + + policyTypeInfo: PolicyTypeInfo; + + constructor(private policyTypeDataSource: PolicyTypeDataSource) { + } + + ngOnInit(): void { + const policyTypeSchema = this.policyTypeDataSource.getPolicyType(this.policyTypeId); + this.policyTypeInfo = new PolicyTypeInfo(policyTypeSchema); + console.log("this.policyType: ", this.policyTypeInfo); + this.isVisible.next(false); + } + + public setIsVisible(status: boolean){ + this.isVisible.next(status); + } + + public toggleVisible() { + this.isVisible.next(!this.isVisible.value); + } +} \ No newline at end of file diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.datasource.ts b/webapp-frontend/src/app/policy/policy-type/policy-type.datasource.ts index 8766084..fe926ee 100644 --- a/webapp-frontend/src/app/policy/policy-type/policy-type.datasource.ts +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.datasource.ts @@ -72,6 +72,20 @@ export class PolicyTypeDataSource extends DataSource { }) } + public getPolicyType(policyTypeId: string): PolicyTypeSchema { + var policyTypeSchema = {} as PolicyTypeSchema; + this.policySvc.getPolicyType(policyTypeId) + .subscribe((policyType: PolicyType) => { + policyTypeSchema.id = policyTypeId; + policyTypeSchema.schemaObject = policyType.policy_schema; + policyTypeSchema.name = policyType.policy_schema.title; + }) + if (policyTypeId === "") { + policyTypeSchema.id = ''; + } + return policyTypeSchema; + } + connect(collectionViewer: CollectionViewer): Observable { return of(this.policyTypeSubject.getValue()); } diff --git a/webapp-frontend/src/app/policy/policy.module.ts b/webapp-frontend/src/app/policy/policy.module.ts index 8334259..90d3df0 100644 --- a/webapp-frontend/src/app/policy/policy.module.ts +++ b/webapp-frontend/src/app/policy/policy.module.ts @@ -24,6 +24,7 @@ import { NgModule } from '@angular/core'; import { MatTableModule } from '@angular/material/table'; import { PolicyCardComponent } from './policy-card/policy-card.component'; import { PolicyControlComponent } from './policy-control.component'; +import { PolicyTypeComponent } from './policy-type/policy-type.component'; import { PolicyInstanceDialogComponent } from './policy-instance-dialog/policy-instance-dialog.component'; import { PolicyInstanceComponent } from './policy-instance/policy-instance.component'; import { ReactiveFormsModule } from '@angular/forms'; @@ -52,6 +53,7 @@ const routes:Routes = [ PolicyControlComponent, PolicyInstanceComponent, PolicyInstanceDialogComponent, + PolicyTypeComponent, RicSelectorComponent, NoTypePolicyEditorComponent, TypedPolicyEditorComponent, @@ -75,7 +77,8 @@ const routes:Routes = [ ], exports: [ PolicyCardComponent, - PolicyControlComponent - ] + PolicyControlComponent, + PolicyTypeComponent + ], }) export class PolicyModule { }