diff options
author | 2022-08-16 17:46:09 +0800 | |
---|---|---|
committer | 2022-08-16 17:46:09 +0800 | |
commit | 6ebc6d22c0654cbdfde1329d5ea7a2f23df5988d (patch) | |
tree | d51551b31b697c7907a7ce366ebc91a2eb31e1f6 /rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts | |
parent | 1915e1c1948fd4252ad6caab9468ea88d24b869e (diff) |
bugfix - rule query failure with empty criteria
Issue-ID: HOLMES-493
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Change-Id: I5ded38ec48f869174a7eec4383ec3488e5eba6d2
Diffstat (limited to 'rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts')
-rw-r--r-- | rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts index ebab289..90964b1 100644 --- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts +++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts @@ -57,7 +57,7 @@ export class AlarmRuleService { let data = {'ruleId': ruleId}; var queryrequest = JSON.stringify(data); const url = `${this.ruleUrl}?queryrequest=${queryrequest}`; - return this.http.get(url, {headers: this.headers}) + return this.http.get(encodeURI(url)) .toPromise() .then(res => res.json().correlationRules as RuleModel[]) .catch(this.handleError); @@ -67,7 +67,7 @@ export class AlarmRuleService { let data = {ruleName: rule.ruleName, enabled: rule.enabled} console.log(JSON.stringify(data)); const url = `${this.ruleUrl}?queryrequest=${JSON.stringify(data)}` - return this.http.get(url, {body: data, headers: this.headers}) + return this.http.get(encodeURI(url)) .toPromise() .then(res => res.json().correlationRules as RuleModel[]) .catch(this.handleError); |