[web-app] 告警通知-接收人配置和消息策略配置。全局字体基础大小修改为12px
This commit is contained in:
32
web-app/src/app/service/notice-rule.service.ts
Normal file
32
web-app/src/app/service/notice-rule.service.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {Observable} from "rxjs";
|
||||
import {Message} from "../pojo/Message";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {NoticeRule} from "../pojo/NoticeRule";
|
||||
|
||||
const notice_rule_uri = '/notice/rule';
|
||||
const notice_rules_uri = '/notice/rules';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NoticeRuleService {
|
||||
|
||||
constructor(private http : HttpClient) { }
|
||||
|
||||
public newNoticeRule(body: NoticeRule) : Observable<Message<any>> {
|
||||
return this.http.post<Message<any>>(notice_rule_uri, body);
|
||||
}
|
||||
|
||||
public editNoticeRule(body: NoticeRule) : Observable<Message<any>> {
|
||||
return this.http.put<Message<any>>(notice_rule_uri, body);
|
||||
}
|
||||
|
||||
public deleteNoticeRule(ruleId: number) : Observable<Message<any>> {
|
||||
return this.http.delete<Message<any>>(`${notice_rule_uri}/${ruleId}`);
|
||||
}
|
||||
|
||||
public getNoticeRules() : Observable<Message<NoticeRule[]>> {
|
||||
return this.http.get<Message<NoticeRule[]>>(notice_rules_uri);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user