运维服务中台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
5.2 KiB

2 years ago
'use strict';
const application = require('../../controllers/alarm/app');
const dataAlarm = require('../../controllers/alarm/data');
const videoAlarm = require('../../controllers/alarm/video')
2 years ago
const service = require('../../controllers/alarm/service')
const dataContinuity = require('../../controllers/alarm/dataContinuity')
2 years ago
module.exports = function (app, router, opts) {
2 years ago
// 应用告警
2 years ago
app.fs.api.logAttr['POST/alarm/application/inspection'] = { content: '保存应用巡检信息', visible: true };
router.post('/alarm/application/inspection', application.inspection);
2 years ago
app.fs.api.logAttr['GET/alarm/application/inspection'] = { content: '查询应用巡检信息', visible: true };
router.get('/alarm/application/inspection', application.inspectionList);
2 years ago
app.fs.api.logAttr['PUT/alarm/application/noted'] = { content: '保存检验状态', visible: true };
2 years ago
router.put('/alarm/application/noted', application.notedInspection);
2 years ago
app.fs.api.logAttr['POST/alarm/application/api'] = { content: '保存应用接口/元素错误信息', visible: true };
2 years ago
router.post('/alarm/application/api', application.apiError);
2 years ago
app.fs.api.logAttr['GET/alarm/application/api'] = { content: '查询应用接口/元素错误信息', visible: true };
router.get('/alarm/application/api', application.apiErrorList);
app.fs.api.logAttr['POST/alarm/application/api_confirm'] = { content: '确认应用接口/元素错误信息', visible: true };
2 years ago
router.post('/alarm/application/api_confirm', application.confirmApiError);
// 数据告警
app.fs.api.logAttr['GET/alarm/data/group'] = { content: '获取数据告警分类', visible: true };
router.get('/alarm/data/group', dataAlarm.groupList);
app.fs.api.logAttr['GET/alarm/data/count'] = { content: '查询数据告警未确认数量', visible: true };
router.get('/alarm/data/count', dataAlarm.alarmCount);
app.fs.api.logAttr['GET/alarm/data/list'] = { content: '查询数据告警列表', visible: true };
router.get('/alarm/data/list', dataAlarm.list);
app.fs.api.logAttr['GET/alarm/data/detail'] = { content: '查询数据告警详情', visible: true };
router.get('/alarm/data/detail', dataAlarm.detail);
app.fs.api.logAttr['GET/alarm/data/detail_agg'] = { content: '查询数据告警详情聚集数据', visible: true };
router.get('/alarm/data/detail_agg', dataAlarm.detailAggregation);
app.fs.api.logAttr['PUT/alarm/data/confirm'] = { content: '确认数据告警', visible: true };
router.put('/alarm/data/confirm', dataAlarm.confirm(opts));
// 视频告警
app.fs.api.logAttr['GET/alarm/video/device_kind'] = { content: '查询视频设备类型', visible: true };
router.get('/alarm/video/device_kind', videoAlarm.deviceType);
app.fs.api.logAttr['GET/alarm/video/list'] = { content: '查询视频告警列表', visible: true };
router.get('/alarm/video/list', videoAlarm.alarmList);
app.fs.api.logAttr['PUT/alarm/video/confirm'] = { content: '确认视频告警信息', visible: true };
router.put('/alarm/video/confirm', videoAlarm.confirm);
app.fs.api.logAttr['POST/alarm/video/added_log'] = { content: '新增视频告警记录', visible: true };
router.post('/alarm/video/added_log', videoAlarm.alarmAdded);
app.fs.api.logAttr['GET/vcmp/auth'] = { content: '获取视频平台应用鉴权token', visible: true };
router.get('/vcmp/auth', videoAlarm.vcmpAppAuthToken);
app.fs.api.logAttr['GET/alarm/video/exceptionType'] = { content: '查询视频异常类型', visible: true };
router.get('/alarm/video/exceptionType', videoAlarm.exceptionType);
2 years ago
app.fs.api.logAttr['POST/alarm/service/api'] = { content: '保存服务异常信息', visible: true };
router.post('/alarm/service/api', service.serviceError);
// app.fs.api.logAttr['GET/alarm/service/api'] = { content: '查询服务异常信息', visible: true };
// router.get('/alarm/service/api', service.serviceErrorList);
app.fs.api.logAttr['POST/data/continuity/api'] = { content: '保存数据连续性监控信息', visible: true };
router.post('/data/continuity/api', dataContinuity.postDataContinuity);
// app.fs.api.logAttr['GET/alarm/service/api'] = { content: '查询服务异常信息', visible: true };
// router.get('/alarm/service/api', service.serviceErrorList);
app.fs.api.logAttr['POST/alarm/service/api'] = { content: '保存服务异常信息', visible: true };
router.post('/alarm/service/api', service.serviceError);
// app.fs.api.logAttr['GET/alarm/service/api'] = { content: '查询服务异常信息', visible: true };
// router.get('/alarm/service/api', service.serviceErrorList);
app.fs.api.logAttr['GET/data/continuity/type_list'] = { content: '获取数据连续性监控信息类型', visible: true };
router.get('/data/continuity/type_list', dataContinuity.dataContinuityTypeList);
app.fs.api.logAttr['GET/data/continuity'] = { content: '获取数据连续性监控信息', visible: true }
router.get('/data/continuity', dataContinuity.dataContinuityList);
app.fs.api.logAttr['GET/data/continuity/:continuityId/detail'] = { content: '获取数据连续性监控信息详细', visible: true }
router.get('/data/continuity/:continuityId/detail', dataContinuity.dataContinuityDetail);
2 years ago
};