- modifyInstance(instance: PolicyInstance): void {
- this.policySvc.getPolicyInstance(instance.policy_id).subscribe(
- (refreshedJson: any) => {
- instance = refreshedJson;
- this.dialog
- .open(
- PolicyInstanceDialogComponent,
- getPolicyDialogProperties(
- this.policyTypeSchema,
- instance,
- this.darkMode
- )
- )
- .afterClosed()
- .subscribe((_: any) => {
- this.getPolicyInstances();
- });
- },
- (httpError: HttpErrorResponse) => {
- this.notificationService.error(
- "Could not refresh instance. Please try again." + httpError.message
- );
- }
+ private openInstanceDialog(policy: PolicyInstance) {
+ const dialogData = getPolicyDialogProperties(
+ this.policyTypeSchema,
+ policy,
+ this.darkMode