X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fpolicy%2Fpolicy-instance%2Fpolicy-instance.component.ts;h=0f34c43a87e1a96ff17cdb4f0dc4ad0fd5885733;hb=800ab849929561945135745ba64ac563f816f333;hp=540bfc8fdbb0430697ed6944a847e326616b3070;hpb=c43690c45b3f4d08d013ec488b83dea793cca646;p=portal%2Fnonrtric-controlpanel.git 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 540bfc8..0f34c43 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 @@ -28,7 +28,6 @@ import { NotificationService } from '../../services/ui/notification.service'; import { PolicyService } from '../../services/policy/policy.service'; import { ConfirmDialogService } from '../../services/ui/confirm-dialog.service'; import { PolicyInstance } from '../../interfaces/policy.types'; -import { NoTypePolicyInstanceDialogComponent } from '../no-type-policy-instance-dialog/no-type-policy-instance-dialog.component'; 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'; @@ -59,7 +58,7 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { } ngOnInit() { - this.instanceDataSource = new PolicyInstanceDataSource(this.policySvc, this.sort, this.notificationService, this.policyTypeSchema); + this.instanceDataSource = new PolicyInstanceDataSource(this.policySvc, this.sort, this.policyTypeSchema); this.expanded.subscribe((isExpanded: boolean) => this.onExpand(isExpanded)); this.ui.darkModeState.subscribe((isDark) => { this.darkMode = isDark; @@ -84,24 +83,13 @@ export class PolicyInstanceComponent implements OnInit, AfterViewInit { this.policySvc.getPolicyInstance(instance.policy_id).subscribe( (refreshedJson: any) => { instance = refreshedJson; - if (this.isSchemaEmpty()) { - this.dialog.open( - NoTypePolicyInstanceDialogComponent, - getPolicyDialogProperties(this.policyTypeSchema, instance, this.darkMode)).afterClosed().subscribe( - (_: any) => { - this.instanceDataSource.getPolicyInstances(); - } - ); - } else { - this.dialog.open( - PolicyInstanceDialogComponent, - getPolicyDialogProperties(this.policyTypeSchema, instance, this.darkMode)).afterClosed().subscribe( - (_: any) => { - this.instanceDataSource.getPolicyInstances(); - } - ); - - } + this.dialog.open( + PolicyInstanceDialogComponent, + getPolicyDialogProperties(this.policyTypeSchema, instance, this.darkMode)).afterClosed().subscribe( + (_: any) => { + this.instanceDataSource.getPolicyInstances(); + } + ); }, (httpError: HttpErrorResponse) => { this.notificationService.error('Could not refresh instance. Please try again.' + httpError.message);