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