Newer
Older
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs/Rx';
import {Injectable} from '@angular/core';
import {SERVER_API_URL} from '../app.constants';
@Injectable()
export class OverAllService {
constructor(private http: HttpClient) {
}
//资源列表--所有类型
find(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/find', data);
stopOrOpen(params1, params2): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/stopOrOpen/' + params1 + '/' + params2);
batchStopOrOpen(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/batchStopOrOpen', data);
return this.http.get(SERVER_API_URL + '/groups/getAll');
}
//资源列表--设备类型
return this.http.get(SERVER_API_URL + '/hostType/selectAllEquipmentType');
findHostByType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/selectAllHostByType/', data);
findDetail(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/find', data);
findDetailed(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/findDetailed/' + data);
responseTime(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/responseTime/' + data);
losed(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/losed/' + data);
cupUsed(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/cpuUsed/' + data.hostId + '/' + data.hostType);
used(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/used/' + data.hostId + '/' + data.hostType);
disks(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/disks/' + data.hostId + '/' + data.hostType);
inOutInfoAgent(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/inOutInfoAgent/' + data);
getinterface(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/hostInterface/getinterface/' + data);
zabbixKey(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/zabbixKey/find/' + data);
return this.http.post(SERVER_API_URL + '/item/create', data);
}
//删除资源--get
deleteHostGet(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/deleteHost/' + data);
return this.http.post(SERVER_API_URL + '/host/deleteHost', data);
}
//添加资源
return this.http.post(SERVER_API_URL + '/host/create', data);
}
//获取分组信息
return this.http.post(SERVER_API_URL + '/groups/getgroups', data);
}
//模版信息
return this.http.get(SERVER_API_URL + '/templates');
}
//添加分组
createGroup(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/groups/create', data);
updataGroup(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/groups/updata', data);
deleteGroup(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/groups/delete', data);
deleteItem(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/item/deleteItem', data);
return this.http.get(SERVER_API_URL + '/host/findSize');
}
//监测点列表--type
findCheckByType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/item/find/', data);
findItemDetail(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/item/details/' + params);
findItemType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/application/find', data);
createItemType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/application/create', data);
findItemCount(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/item/findItemStatistics/' + params);
findGraphData(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/graph/findGraphData/', data);
itemUpdate(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/item/updata/', data);
itemUpdata(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/item/updata/', data);
return this.http.post(SERVER_API_URL + '/host/tempStop', data);
return this.http.get(SERVER_API_URL + '/statistics/findHostWarningCount');
}
//查询所有告警组
updateHost(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/host/updataHost', data);
return this.http.get(SERVER_API_URL + '/host/findHostCountByStatus/' + params);
}
//查询所有主机的警告数和高危报警数
return this.http.get(SERVER_API_URL + '/statistics/findWarningByAll/' + params);
}
findWebscenario(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/find', data);
updateWebscenario(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/webscenario/update', data);
createWebscenario(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/create', data);
tempStopWebscenario(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/tempStop', data);
tempStopCancelWebscenario(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/webscenario/temp-stop-cancel/' + params);
statusBatch(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/statusBatch', data);
deleteBatch(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/delete', data);
findWeb(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/webscenario/find/' + params);
findAlertAim(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/webscenario/find-alert-aim/' + params);
addWebAction(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/add-web-action', data);
findCurrentState(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/webscenario/find-current-state/' + params);
findChart(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/findChart', data);
findTrigger(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/webscenario/find-trigger/' + params);
findAlert(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/webscenario/findAlert', data);
return this.http.get(SERVER_API_URL + '/webscenario/countStatus');
}
createTrigger(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/item/createItemTrigger', data);
updateTrigger(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/item/updateItemTrigger', data);
}
//查看映射值
findValuemap(): Observable<any> {
return this.http.get(SERVER_API_URL + '/valuemap/find');