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) {
}
//获取分组信息 --列表
getgroups(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/groups/getgroups', data);
}
//查询模板组-----列表
getTemplateGroups(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getTemplateGroups');
}
//资源列表--资源分组 ---主机组下拉框
findGroup(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getAll');
}
//获取分组信息 --编辑页面获取分组 1 表示模板 0表示主机
getEditGroups(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getAllUpdate/' + params);
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 + '/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);
return this.http.get(SERVER_API_URL + '/host/cpuUsed/' + data.hostId);
return this.http.get(SERVER_API_URL + '/host/used/' + data.hostId);
return this.http.get(SERVER_API_URL + '/host/disks/' + data.hostId);
inOutInfoAgent(data): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/inOutInfoAgent/' + data);
findInterface(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/findInterface/' + params);
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.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');
//分页查询触发器
findPageTrigger(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/triggerPrototype/findPage', data);
}
//主键查询触发器原型
findTriggerById(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/triggerPrototype/find/' + params);
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
}
//删除触发器
deleteTrigger(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/triggerPrototype/delete', data);
}
//修改触发器原型
updateTriggerPrototype(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/triggerPrototype/update', data);
}
//添加触发器原型
createTriggerPrototype(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/triggerPrototype/create', data);
}
//添加监控项原型
createItemPrototype(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemprototype/create', data);
}
//删除监控项原型
deleteItemPrototype(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemprototype/delete', data);
}
//分页查询监控项原型
findItemPrototype(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemprototype/findPage', data);
}
//修改监控项原型
updateItemPrototype(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemprototype/update', data);
}
//主键查询监控项原型
findItemById(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/itemprototype/find/' + params);
createTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/create', data);
}
updateTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/update', data);
}
findTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/findTrigger', data);
}
//删除触发器
deleteTri(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trigger/delete', data);
}
//下载xml模板
exportTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/export', data);
}
//上传xml模板
importTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/import', data);
}
//主机四种状态数(优化)
findHostCountByStatusByHost(): Observable<any> {
return this.http.get(SERVER_API_URL + '/host/findHostCountByStatus');
}
//分页查询主机(优化)
findHostPageNew(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/findHostPageNew', data);
}
//通过sql查询主机(优化)
findHostNew(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/findHostNew', data);
}
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
//发送利用率排名
homeUseOrder(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/useOrder/' + params);
}
//查询业务系统的安全运行天数
findSafeRunDayList(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itservice/findSafeRunDayList', data);
}
//查询主机cpu内存使用率排名列表
runStateOrder(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/runStateOrder/' + params);
}
//查询主机发送接收流量排名列表
homeFlowOrder(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/flowOrder/' + params);
}
//查询监控项流量排名列表
flowOrderByItem(params1, params2): Observable<any> {
return this.http.get(SERVER_API_URL + '/home/flowOrderByItem/' + params1 + '/' + params2);
}
// 无锡监狱
//查找所有有数据的网口
findNetworkCard(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/hostSwitch/findNetworkCard/' + params);
}
//查询网卡流量图表接口
findNetworkFlow(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/hostSwitch/findNetworkFlow', data);
}
//根据类型查询图表数据(右上角指标趋势)
findChartByKey(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/hostSwitch/findChartByKey', data);
}
//根据数据库类型查找数据库详细指标
findDatabaseDetailByHost(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemDatabase/findDatabaseDetailByHost', data);
}
//查找数据库详情指标
findIndexDetail(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemDatabase/findIndexDetail', data);
}
//查找数据库详情指标
findChartData(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/itemDatabase/findChartData', data);
}
//根据主机查询所有的数据库类型
findAllDatabaseByHost(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/itemDatabase/findAllDatabaseByHost/' + params);
}
//根据主机查询告警总数趋势图表
waringTrendByHost(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/statistics/waringTrendByHost', data);
}
//查询系统信息
getSystem(): Observable<any> {
return this.http.get( './json/system.json');
}