From: tang peng Date: Mon, 30 Jul 2018 23:57:59 +0000 (+0000) Subject: Merge "Fixed some field names" X-Git-Tag: 1.2.0~32 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=da9261d9d5ed404ed030918238feaab0dd54fcc1;hp=18152dddbb79a461064561b00c71d6fe01f00972;p=holmes%2Frule-management.git Merge "Fixed some field names" --- diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts index 6273e9a..6a3ea0a 100644 --- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts +++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts @@ -39,7 +39,7 @@ export class AlarmRule implements OnInit { model: any; ruleRequest: RuleRequest; solution = 'ANGULAR'; - selection = 'A' + selection = 'A'; activeStatus = ["option_all", "common_enabled", "common_disabled"]; constructor(public _alarmRuleService: AlarmRuleService, private modalService: ModalService, @@ -76,7 +76,7 @@ export class AlarmRule implements OnInit { return this._alarmRuleService .getRules() .then(rules => { - this.rules = rules.rules; + this.rules = rules.correlationRules; this.totalcount = rules.totalcount; }); } diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts index d558041..b410d6d 100644 --- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts +++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts @@ -69,7 +69,7 @@ export class AlarmRuleService { const url = `${this.ruleUrl}?queryrequest=${JSON.stringify(data)}` return this.http.get(url, { body: data, headers: this.headers }) .toPromise() - .then(res => res.json().rules as RuleModel[]) + .then(res => res.json().correlatoinRules as RuleModel[]) .catch(this.handleError); } @@ -88,7 +88,8 @@ export class AlarmRuleService { "ruleId": rule.ruleId, "description": rule.description, "content": rule.content, - "enabled": rule.enabled + "enabled": rule.enabled, + "loopControlName": rule.loopControlName } const url = `${this.ruleUrl}` return this.http @@ -103,7 +104,8 @@ export class AlarmRuleService { "description": rule.description, "content": rule.content, "enabled": rule.enabled, - "ruleName": rule.ruleName + "ruleName": rule.ruleName, + "loopControlName": rule.loopControlName } return this.http.put(this.ruleUrl, JSON.stringify(ruledata), { headers: this.headers }) .toPromise()