From 34f9a3b9111f9febb0945ed1311df09b2bb1d962 Mon Sep 17 00:00:00 2001 From: pengpengshui Date: Tue, 18 Jul 2017 14:00:17 -0700 Subject: [PATCH] fix issue about endpontUrl,username,password should have data when connent-test button could click #2435 --- .../create-edit-endpoint.component.html.ts | 2 +- .../create-edit-endpoint/create-edit-endpoint.component.ts | 4 ++++ .../src/create-edit-rule/create-edit-rule.component.html.ts | 2 +- .../lib/src/create-edit-rule/create-edit-rule.component.ts | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.html.ts b/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.html.ts index f451b1bba..35fa32389 100644 --- a/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.html.ts +++ b/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.html.ts @@ -45,7 +45,7 @@ export const CREATE_EDIT_ENDPOINT_TEMPLATE: string = ` diff --git a/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts b/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts index 3aa79d8e7..91f85adcc 100644 --- a/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts +++ b/src/ui_ng/lib/src/create-edit-endpoint/create-edit-endpoint.component.ts @@ -83,6 +83,10 @@ export class CreateEditEndpointComponent implements AfterViewChecked { }; } + get hasConnectData():boolean{ + return !this.target.endpoint || !this.target.username || !this.target.password; + } + constructor( private endpointService: EndpointService, private errorHandler: ErrorHandler, diff --git a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts index 43eb0daa9..ea309d38b 100644 --- a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts +++ b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts @@ -81,7 +81,7 @@ export const CREATE_EDIT_RULE_TEMPLATE: string = ` diff --git a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.ts b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.ts index 515bcadb1..893a302c1 100644 --- a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.ts +++ b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.ts @@ -144,7 +144,9 @@ export class CreateEditRuleComponent implements AfterViewChecked { } get connectAbled():boolean{ return !this.createEditRule.endpointId && !this.isCreateEndpoint; - + } + get hasConnectData():boolean{ + return !this.createEditRule.endpointUrl || !this.createEditRule.username || !this.createEditRule.password; } constructor(