From f1b34fc053e18265baacd9d10d91b4448a19b4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D1=80=D0=B8=D1=81=D1=82=D0=B8=D0=BD=D0=B0=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D1=89=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Thu, 26 Oct 2017 13:45:11 +0700 Subject: [PATCH] fix(sg-rules): System Firewall templates view mode bug (#634) --- src/app/security-group/sg-rules/sg-rules-dialog.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/security-group/sg-rules/sg-rules-dialog.component.ts b/src/app/security-group/sg-rules/sg-rules-dialog.component.ts index 2f93fa92bb..0e0703bc0e 100644 --- a/src/app/security-group/sg-rules/sg-rules-dialog.component.ts +++ b/src/app/security-group/sg-rules/sg-rules-dialog.component.ts @@ -53,7 +53,8 @@ export class SecurityGroupRulesDialogComponent { } private loadEntity(id: string): Observable { - return this.entityService.get(id); + const entity = this.entityService.getPredefinedTemplates().find(item => item.id === id); + return entity ? Observable.of(entity) : this.entityService.get(id); } private onError(error: any): void {