From 71a5d24633350ca0f89367a49bd174d883029441 Mon Sep 17 00:00:00 2001 From: Yogi_Wang Date: Wed, 13 Nov 2019 19:15:46 +0800 Subject: [PATCH] Fix webhook testing-error bug Signed-off-by: Yogi_Wang --- .../webhook/add-webhook-form/add-webhook-form.component.ts | 4 +++- .../app/project/webhook/add-webhook/add-webhook.component.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.ts b/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.ts index c3ce6627c..d83b75c7c 100644 --- a/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.ts +++ b/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.ts @@ -77,9 +77,9 @@ export class AddWebhookFormComponent implements OnInit, OnChanges { if (this.isModify) { this.inlineAlert.showInlineError("WEBHOOK.TEST_ENDPOINT_FAILURE"); } else { - this.checkBtnState = ClrLoadingState.DEFAULT; this.messageHandlerService.handleError(error); } + this.checkBtnState = ClrLoadingState.DEFAULT; } ); } @@ -87,6 +87,7 @@ export class AddWebhookFormComponent implements OnInit, OnChanges { onCancel() { this.close.emit(false); this.currentForm.reset(); + this.inlineAlert.close(); } onSubmit() { @@ -101,6 +102,7 @@ export class AddWebhookFormComponent implements OnInit, OnChanges { .subscribe( response => { this.edit.emit(this.isModify); + this.inlineAlert.close(); }, error => { this.isModify diff --git a/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.ts b/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.ts index b07e4f6db..4c3168036 100644 --- a/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.ts +++ b/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.ts @@ -16,7 +16,7 @@ import { AddWebhookFormComponent } from "../add-webhook-form/add-webhook-form.co }) export class AddWebhookComponent implements OnInit { isOpen: boolean = false; - closable: boolean = true; + closable: boolean = false; staticBackdrop: boolean = true; @Input() projectId: number;