2021-06-11 23:00:33 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @author 陈劲松
|
|
|
|
|
|
* @date 2021/6/11
|
2021-06-22 21:19:04 +08:00
|
|
|
|
* @description 1.定义api;2.定义通用查询方法,函数名应为 获取详情getItem、获取列表getItemList。例如getUser、getUserList
|
2021-06-11 23:00:33 +08:00
|
|
|
|
*/
|
2021-10-16 15:50:12 +08:00
|
|
|
|
import axios from 'axios'
|
2021-06-22 21:19:04 +08:00
|
|
|
|
import { sortByOrderNum } from '@/permission'
|
2021-08-11 22:14:23 +08:00
|
|
|
|
import { storageKey } from '@/utils/constants'
|
2023-06-12 10:51:56 +08:00
|
|
|
|
const apiVersion = BASE_CONFIG.apiVersion
|
2021-06-11 23:00:33 +08:00
|
|
|
|
|
2021-06-15 09:25:10 +08:00
|
|
|
|
export const api = {
|
2021-06-22 21:19:04 +08:00
|
|
|
|
// 系统相关
|
|
|
|
|
|
permission: '/sys/user/permissions',
|
|
|
|
|
|
dict: '/sys/dict',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
logout: '/logout',
|
|
|
|
|
|
pin: 'sys/user/pin',
|
|
|
|
|
|
appearance: '/sys/appearance',
|
2024-02-01 20:46:22 +08:00
|
|
|
|
license: '/sys/license',
|
|
|
|
|
|
downloadLicenseC2v: '/sys/license/download',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
permissions: '/sys/user/permissions',
|
|
|
|
|
|
operationLog: '/sys/log',
|
2022-04-14 17:22:48 +08:00
|
|
|
|
login: '/sys/login',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
// user
|
2021-09-02 17:12:27 +08:00
|
|
|
|
user: '/sys/user',
|
2023-03-24 18:44:02 +08:00
|
|
|
|
timezone: '/sys/timezones',
|
2022-09-15 15:51:00 +08:00
|
|
|
|
// 获取配置
|
|
|
|
|
|
config: '/sys/config',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
// role
|
2021-09-02 17:12:27 +08:00
|
|
|
|
role: '/sys/role',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
menu: '/sys/role/menu/',
|
|
|
|
|
|
sysMenu: '/sys/menu/',
|
|
|
|
|
|
// i18n
|
2022-04-14 17:22:48 +08:00
|
|
|
|
i18nLang: '/sys/i18n/lang',
|
|
|
|
|
|
i18nSys: '/sys/i18n',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
// chart
|
2021-10-15 16:42:15 +08:00
|
|
|
|
chartList: '/visual/chart/list',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
// galaxyProxy
|
|
|
|
|
|
galaxyProxy: '/galaxy/setting',
|
2023-02-23 18:12:20 +08:00
|
|
|
|
// 知识库
|
2023-08-24 17:15:41 +08:00
|
|
|
|
knowledgeBase: apiVersion + '/knowledgeBase',
|
|
|
|
|
|
knowledgeBaseList: apiVersion + '/knowledgeBase/list',
|
|
|
|
|
|
knowledgeBaseEnable: apiVersion + '/knowledgeBase/status',
|
2023-10-23 18:42:32 +08:00
|
|
|
|
knowledgeBaseLearningStart: apiVersion + '/knowledgeBase/intelligence-learning/start',
|
|
|
|
|
|
knowledgeBaseLearningStop: apiVersion + '/knowledgeBase/intelligence-learning/stop',
|
2023-08-24 17:15:41 +08:00
|
|
|
|
knowledgeBaseStatistics: apiVersion + '/knowledgeBase/statistics',
|
|
|
|
|
|
updateKnowledgeUrl: apiVersion + '/knowledgeBase/items/batch',
|
|
|
|
|
|
knowledgeBaseLog: apiVersion + '/knowledgeBase/audit/log',
|
2023-10-27 07:46:34 +08:00
|
|
|
|
knowledgeBaseTimedistribution: apiVersion + '/knowledgeBase/{{knowledgeId}}/{{type}}/timedistribution',
|
2024-01-09 11:10:28 +08:00
|
|
|
|
// 插件
|
2023-12-29 18:04:50 +08:00
|
|
|
|
pluginList: apiVersion + '/plugin/intelligence-learning/list',
|
2024-01-09 11:10:28 +08:00
|
|
|
|
pluginStatusEnable: apiVersion + '/plugin/intelligence-learning/{{id}}/start',
|
|
|
|
|
|
pluginStatusDisable: apiVersion + '/plugin/intelligence-learning/{{id}}/stop',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
|
2022-04-12 18:00:01 +08:00
|
|
|
|
// 报告相关
|
2022-04-14 15:52:07 +08:00
|
|
|
|
reportJob: '/report/job',
|
2022-06-06 17:37:01 +08:00
|
|
|
|
reportJobCount: '/report/job/count',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
reportTemp: '/report/temp',
|
2022-06-06 17:37:01 +08:00
|
|
|
|
reportCategory: '/report/category',
|
2022-04-14 15:52:07 +08:00
|
|
|
|
reportBatchDownloadPdf: '/report/job/batchDownloadPdf',
|
|
|
|
|
|
reportDownloadPdf: '/report/job/downloadPdf',
|
|
|
|
|
|
reportView: '/report/job/view',
|
2021-06-22 21:19:04 +08:00
|
|
|
|
// 业务
|
2021-06-15 09:25:10 +08:00
|
|
|
|
panel: '/visual/panel',
|
2021-07-07 22:58:52 +08:00
|
|
|
|
chart: '/visual/chart',
|
2021-12-31 10:55:49 +08:00
|
|
|
|
entityList: '/interface/entity/list/basic',
|
2022-01-05 20:24:02 +08:00
|
|
|
|
entityListTotal: '/interface/entity/list/total',
|
2021-08-11 22:14:23 +08:00
|
|
|
|
entityCount: '/interface/entity/total',
|
2021-12-31 10:55:49 +08:00
|
|
|
|
entityFilter: '/interface/entity/filter/count',
|
|
|
|
|
|
entityFilterTop: '/interface/entity/filter/top',
|
2021-09-30 00:50:11 +08:00
|
|
|
|
ipThroughput: '/interface/entity/ip/detail/throughput',
|
|
|
|
|
|
domainThroughput: '/interface/entity/domain/detail/throughput',
|
2021-12-23 17:17:06 +08:00
|
|
|
|
appThroughput: '/interface/entity/app/detail/throughput',
|
2021-12-31 10:40:37 +08:00
|
|
|
|
filterTop: '/interface/entity/filter/top',
|
|
|
|
|
|
entityTotal: '/interface/entity/index/total',
|
|
|
|
|
|
entityNew: '/interface/entity/index/new',
|
|
|
|
|
|
entityActive: '/interface/entity/index/active',
|
|
|
|
|
|
entityTraffic: '/interface/entity/list/traffic',
|
|
|
|
|
|
ipBytes: '/interface/entity/detail/ip/bytes',
|
|
|
|
|
|
domainBytes: '/interface/entity/detail/domain/bytes',
|
2022-01-04 14:54:26 +08:00
|
|
|
|
appBytes: '/interface/entity/detail/app/bytes',
|
|
|
|
|
|
// app detail
|
|
|
|
|
|
entityAppDetailTraffic: '/interface/entity/detail/overview/app/traffic',
|
|
|
|
|
|
entityAppDetailRelation: '/interface/entity/detail/overview/app/relation',
|
2022-02-13 23:20:24 +08:00
|
|
|
|
entityAppDetailNetworkQuantity: '/interface/entity/detail/overview/app/networkQuantity',
|
|
|
|
|
|
entityAppDetailLinkIn: '/interface/entity/detail/overview/app/linkIn',
|
|
|
|
|
|
entityAppDetailLinkOut: '/interface/entity/detail/overview/app/linkOut',
|
2022-03-18 16:23:55 +08:00
|
|
|
|
entityAppDetailPerformance: '/interface/entity/detail/overview/app/performanceEvent',
|
2022-03-18 15:49:53 +08:00
|
|
|
|
entityAppDetailSecurity: '/interface/entity/detail/overview/app/securityEvent',
|
2022-02-16 18:19:58 +08:00
|
|
|
|
entityAppRelatedServerDomain: '/interface/entity/detail/overview/app/relatedDomain',
|
|
|
|
|
|
entityAppRelatedServerIp: '/interface/entity/detail/overview/app/relatedServerIp',
|
2022-05-21 17:42:08 +08:00
|
|
|
|
entityAppRelatedServerAppOverview: '/interface/entity/detail/app/serviceOverview',
|
|
|
|
|
|
entityAppDetailBasic: '/interface/entity/detail/app/basic',
|
2022-01-04 14:54:26 +08:00
|
|
|
|
// domain detail
|
|
|
|
|
|
entityDomainDetailBasic: '/interface/entity/detail/overview/domain/basic',
|
|
|
|
|
|
entityDomainDetailTraffic: '/interface/entity/detail/overview/domain/traffic',
|
|
|
|
|
|
entityDomainDetailRelation: '/interface/entity/detail/overview/domain/relation',
|
|
|
|
|
|
entityDomainDetailNetworkQuantity: '/interface/entity/detail/overview/domain/networkQuantity',
|
|
|
|
|
|
entityDomainDetailLinkIn: '/interface/entity/detail/overview/domain/linkIn',
|
|
|
|
|
|
entityDomainDetailLinkOut: '/interface/entity/detail/overview/domain/linkOut',
|
2022-03-18 16:23:55 +08:00
|
|
|
|
entityDomainDetailPerformance: '/interface/entity/detail/overview/domain/performanceEvent',
|
2022-03-18 15:49:53 +08:00
|
|
|
|
entityDomainDetailSecurity: '/interface/entity/detail/overview/domain/securityEvent',
|
2022-02-16 18:19:58 +08:00
|
|
|
|
entityDomainRelatedServerIp: '/interface/entity/detail/overview/domain/relatedServerIp',
|
|
|
|
|
|
entityDomainRelatedServerApp: '/interface/entity/detail/overview/domain/relatedApp',
|
2022-04-01 14:06:09 +08:00
|
|
|
|
entityDetectionsIp: '/interface/entity/detail/overview/ip/dnsInfo',
|
|
|
|
|
|
entityDetectionsIpQueryRate: '/interface/entity/detail/overview/ip/dnsQueryRate',
|
2022-05-21 17:42:08 +08:00
|
|
|
|
entityDomainRelatedServerDomainOverview: '/interface/entity/detail/domain/serviceOverview',
|
2022-01-04 14:54:26 +08:00
|
|
|
|
// ip detail
|
|
|
|
|
|
entityIpDetailTraffic: '/interface/entity/detail/overview/ip/traffic',
|
2022-01-21 21:03:39 +08:00
|
|
|
|
entityIpDetailTrafficMap: '/interface/entity/detail/ip/trafficMap',
|
2022-01-26 14:39:17 +08:00
|
|
|
|
entityDomainDetailTrafficMap: '/interface/entity/detail/domain/trafficMap',
|
|
|
|
|
|
entityAppDetailTrafficMap: '/interface/entity/detail/app/trafficMap',
|
2022-01-04 14:54:26 +08:00
|
|
|
|
entityIpDetailRelation: '/interface/entity/detail/overview/ip/relation',
|
2022-02-13 23:20:24 +08:00
|
|
|
|
entityIpDetailNetworkQuantity: '/interface/entity/detail/overview/ip/networkQuantity',
|
|
|
|
|
|
entityIpDetailLinkIn: '/interface/entity/detail/overview/ip/linkIn',
|
|
|
|
|
|
entityIpDetailLinkOut: '/interface/entity/detail/overview/ip/linkOut',
|
2022-03-18 16:23:55 +08:00
|
|
|
|
entityIpDetailPerformance: '/interface/entity/detail/overview/ip/performanceEvent',
|
2022-03-18 15:49:53 +08:00
|
|
|
|
entityIpDetailSecurity: '/interface/entity/detail/overview/ip/securityEvent',
|
2022-02-16 18:19:58 +08:00
|
|
|
|
entityIpRelatedServerDomain: '/interface/entity/detail/overview/ip/relatedDomain',
|
2022-02-17 19:28:48 +08:00
|
|
|
|
entityIpRelatedServerApp: '/interface/entity/detail/overview/ip/relatedApp',
|
2022-05-21 17:42:08 +08:00
|
|
|
|
entityIpRelatedServerIpOverview: '/interface/entity/detail/ip/serviceOverview',
|
|
|
|
|
|
entityIpDetailBasic: '/interface/entity/detail/ip/basic',
|
2022-02-18 18:09:44 +08:00
|
|
|
|
// detection
|
2022-02-25 13:33:54 +08:00
|
|
|
|
detection: {
|
|
|
|
|
|
securityEvent: {
|
2022-02-28 11:53:37 +08:00
|
|
|
|
eventSeverityTrend: '/interface/detection/security/filter/severityTrend',
|
|
|
|
|
|
securityType: '/interface/detection/security/filter/securityType',
|
|
|
|
|
|
offenderIp: '/interface/detection/security/filter/offenderIp',
|
|
|
|
|
|
offenderLocation: '/interface/detection/security/filter/offenderLocation',
|
|
|
|
|
|
victimIp: '/interface/detection/security/filter/victimIp',
|
|
|
|
|
|
victimLocation: '/interface/detection/security/filter/victimLocation',
|
|
|
|
|
|
eventSeverity: '/interface/detection/security/filter/severity',
|
|
|
|
|
|
listBasic: '/interface/detection/security/list/basic',
|
2022-03-05 20:25:03 +08:00
|
|
|
|
listCount: '/interface/detection/security/list/count',
|
2022-02-28 11:53:37 +08:00
|
|
|
|
overviewBasic: '/interface/detection/security/detail/overview/basic',
|
2023-10-20 15:45:11 +08:00
|
|
|
|
overviewEvent: '/interface/detection/security/detail/overview/event',
|
|
|
|
|
|
securityList: apiVersion + '/detection/security/list', // 安全事件列表
|
|
|
|
|
|
timeDistribution: apiVersion + '/detection/security/severity/timedistribution', // 事件严重等级分布(顶部柱状图)
|
|
|
|
|
|
severityStatistics: apiVersion + '/detection/security/severity/statistics', // 事件严重等级统计(左侧filter事件严重等级和饼图)
|
|
|
|
|
|
statusStatistics: apiVersion + '/detection/security/status/statistics', // 事件状态统计
|
|
|
|
|
|
eventTypeStatistics: apiVersion + '/detection/security/event-type/statistics', // 事件类型统计
|
|
|
|
|
|
offenderIpStatistics: apiVersion + '/detection/security/offender-ip/statistics', // 攻击者IP统计
|
|
|
|
|
|
victimIpStatistics: apiVersion + '/detection/security/victim-ip/statistics', // 受害者IP统计
|
|
|
|
|
|
relationEvent: apiVersion + '/detection/security/ip/relation/event', // IP相关近期事件
|
|
|
|
|
|
securityCount: apiVersion + '/detection/security/count', // 安全事件总数
|
|
|
|
|
|
detail: apiVersion + '/detection/security/entity/detail', // 安全事件实体详情,后面得加上实体类型
|
|
|
|
|
|
ipDetail: apiVersion + '/detection/security/entity/detail/ip', // 安全事件实体详情ip响应
|
|
|
|
|
|
domainDetail: apiVersion + '/detection/security/entity/detail/domain', // 安全事件实体详情domain响应
|
|
|
|
|
|
appDetail: apiVersion + '/detection/security/entity/detail/app' // 安全事件实体详情app响应
|
2022-02-25 13:33:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
performanceEvent: {
|
2022-02-28 11:53:37 +08:00
|
|
|
|
eventSeverityTrend: '/interface/detection/performance/filter/severityTrend',
|
2022-03-04 15:46:30 +08:00
|
|
|
|
eventType: '/interface/detection/performance/filter/eventType',
|
2022-02-28 11:53:37 +08:00
|
|
|
|
eventSeverity: '/interface/detection/performance/filter/severity',
|
|
|
|
|
|
activeEntity: '/interface/detection/performance/filter/activeEntity',
|
|
|
|
|
|
listBasic: '/interface/detection/performance/list/basic',
|
2022-03-05 20:25:03 +08:00
|
|
|
|
listCount: '/interface/detection/performance/list/count',
|
2022-03-18 18:25:50 +08:00
|
|
|
|
overviewBasic: '/interface/detection/performance/detail/overview/basic',
|
2022-05-27 18:22:23 +08:00
|
|
|
|
dnsErrorMetric: '/interface/detection/performance/detail/overview/metric/dnsError',
|
|
|
|
|
|
httpErrorMetric: '/interface/detection/performance/detail/overview/metric/httpError',
|
|
|
|
|
|
highDnsResponseTimeMetric: '/interface/detection/performance/detail/overview/metric/highDnsResponseTime'
|
2023-08-03 18:47:18 +08:00
|
|
|
|
},
|
|
|
|
|
|
list: apiVersion + '/rule/detection/list', // 检测规则列表
|
|
|
|
|
|
detail: apiVersion + '/rule/detection', // 检测规则详情
|
2023-10-16 17:53:46 +08:00
|
|
|
|
delete: apiVersion + '/rule/detection', // 检测规则删除
|
2023-08-03 18:47:18 +08:00
|
|
|
|
// 获取单位列表,如source、type、metric等
|
2023-10-16 17:53:46 +08:00
|
|
|
|
statistics: apiVersion + '/rule/detection/statistics',
|
2023-08-03 18:47:18 +08:00
|
|
|
|
// 规则新建模块
|
|
|
|
|
|
create: {
|
|
|
|
|
|
topKeys: apiVersion + '/detection/topKeys', // topKeys列表
|
2023-10-16 17:53:46 +08:00
|
|
|
|
create: apiVersion + '/rule/detection'
|
2022-02-25 13:33:54 +08:00
|
|
|
|
}
|
2022-04-14 15:52:07 +08:00
|
|
|
|
},
|
|
|
|
|
|
// Dashboard
|
|
|
|
|
|
dashboard: {
|
|
|
|
|
|
DnsServiceInsights: {
|
|
|
|
|
|
alarmInfoCount: '/interface/dns/alarmInfoCount'
|
|
|
|
|
|
}
|
2022-08-02 20:17:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
// networkOverview
|
|
|
|
|
|
netWorkOverview: {
|
2022-08-05 15:50:54 +08:00
|
|
|
|
totalTrafficAnalysis: '/interface/overview/totalTrafficAnalysis',
|
2023-09-01 10:04:51 +08:00
|
|
|
|
drilldownTrafficAnalysis: '/interface/overview/trafficAnalysis',
|
2022-08-02 20:17:47 +08:00
|
|
|
|
eventSeverity: '/interface/overview/eventSeverity',
|
|
|
|
|
|
eventType: '/interface/overview/eventType',
|
|
|
|
|
|
ddosEventAnalysis: '/interface/overview/ddosEventAnalysis',
|
2022-08-05 15:50:54 +08:00
|
|
|
|
applicationCycleTrafficTotal: '/interface/overview/applicationCycleTrafficTotal',
|
2022-08-05 17:40:39 +08:00
|
|
|
|
applicationTrafficAnalysis: '/interface/overview/applicationTrafficAnalysis',
|
|
|
|
|
|
appCompanyTrafficAnalysis: '/interface/overview/appCompanyTrafficAnalysis',
|
|
|
|
|
|
appCompanyCycleTrafficTotal: '/interface/overview/appCompanyCycleTrafficTotal'
|
2022-08-08 17:45:50 +08:00
|
|
|
|
},
|
|
|
|
|
|
npm: {
|
|
|
|
|
|
overview: {
|
|
|
|
|
|
tcpSessionDelay: '/interface/application/performance/overview/tcpSessionDelay',
|
|
|
|
|
|
httpResponseDelay: '/interface/application/performance/overview/httpResponseDelay',
|
|
|
|
|
|
sslConDelay: '/interface/application/performance/overview/sslConDelay',
|
|
|
|
|
|
tcpLostlenPercent: '/interface/application/performance/overview/tcpLostlenPercent',
|
2022-08-09 21:19:21 +08:00
|
|
|
|
packetRetransPercent: '/interface/application/performance/overview/packetRetransPercent',
|
|
|
|
|
|
// app类别评分
|
|
|
|
|
|
appTrafficAnalysis: '/interface/application/performance/overview/appTrafficAnalysis',
|
|
|
|
|
|
appTcpSessionDelay: '/interface/application/performance/overview/appTcpSessionDelay',
|
|
|
|
|
|
appHttpResponseDelay: '/interface/application/performance/overview/appHttpResponseDelay',
|
|
|
|
|
|
appSslConDelay: '/interface/application/performance/overview/appSslConDelay',
|
|
|
|
|
|
appTcpLostlenPercent: '/interface/application/performance/overview/appTcpLostlenPercent',
|
2022-08-12 15:25:54 +08:00
|
|
|
|
appPacketRetransPercent: '/interface/application/performance/overview/appPacketRetransPercent',
|
2022-11-02 19:28:11 +08:00
|
|
|
|
// 整体流量折线图
|
|
|
|
|
|
totalTrafficAnalysis: '/interface/application/performance/overview/totalTrafficAnalysis',
|
|
|
|
|
|
totalNetworkAnalysis: '/interface/application/performance/overview/totalNetworkAnalysis',
|
|
|
|
|
|
totalHttpResponseDelay: '/interface/application/performance/overview/totalHttpResponseDelay',
|
|
|
|
|
|
totalSslConDelay: '/interface/application/performance/overview/totalSslConDelay',
|
2022-08-12 15:25:54 +08:00
|
|
|
|
// 各维度下钻会话统计
|
|
|
|
|
|
relatedSessions: '/interface/application/performance/relatedSessions',
|
|
|
|
|
|
// 各维度下钻流量曲线图
|
2022-08-23 21:42:42 +08:00
|
|
|
|
trafficGraph: '/interface/application/performance/overview/drilldown/drilldown/dimension/trafficGraph',
|
2022-08-30 19:08:29 +08:00
|
|
|
|
// 各维度下钻网络性能
|
|
|
|
|
|
networkAnalysis: '/interface/application/performance/overview/drilldown/dimension/networkAnalysis',
|
2022-11-25 16:08:32 +08:00
|
|
|
|
// 各维度下钻网络性能 三级菜单
|
|
|
|
|
|
allNetworkAnalysis: '/interface/application/performance/overview/drilldown/dimension/allNetworkAnalysis',
|
2022-08-23 21:42:42 +08:00
|
|
|
|
// 下钻地图
|
|
|
|
|
|
map: '/interface/application/performance/overview/drilldown/dimension/clientLocations/world/trafficAnalysis',
|
|
|
|
|
|
mapTcp: '/interface/application/performance/overview/drilldown/dimension/clientLocations/world/tcpSessionDelay',
|
|
|
|
|
|
mapHttp: '/interface/application/performance/overview/drilldown/dimension/clientLocations/world/httpResponseDelay',
|
|
|
|
|
|
mapSsl: '/interface/application/performance/overview/drilldown/dimension/clientLocations/world/sslConDelay',
|
|
|
|
|
|
mapPacketLoss: '/interface/application/performance/overview/drilldown/dimension/clientLocations/world/tcpSessionDelay',
|
|
|
|
|
|
mapPacketRetrans: '/interface/application/performance/overview/drilldown/dimension/clientLocations/world/tcpSessionDelay'
|
2022-08-08 17:45:50 +08:00
|
|
|
|
},
|
|
|
|
|
|
location: {
|
2022-08-11 16:45:48 +08:00
|
|
|
|
// 折线图
|
2022-08-19 10:06:27 +08:00
|
|
|
|
map: '/interface/application/performance/location/networkMap',
|
|
|
|
|
|
mapTcp: '/interface/application/performance/location/tcpSessionDelay',
|
|
|
|
|
|
mapHttp: '/interface/application/performance/location/httpResponseDelay',
|
|
|
|
|
|
mapSsl: '/interface/application/performance/location/sslConDelay',
|
|
|
|
|
|
mapPacketLoss: '/interface/application/performance/location/tcpLostlenPercent',
|
|
|
|
|
|
mapPacketRetrans: '/interface/application/performance/location/packetRetransPercent',
|
2022-08-11 16:45:48 +08:00
|
|
|
|
thoughput: '/interface/application/performance/location/thoughput',
|
|
|
|
|
|
tcpConnectionEstablishLatency: '/interface/application/performance/location/tcpConnectionEstablishLatency',
|
|
|
|
|
|
httpResponseLatency: '/interface/application/performance/location/httpResponseLatency',
|
|
|
|
|
|
sslHandshakeLatency: '/interface/application/performance/location/sslHandshakeLatency',
|
|
|
|
|
|
packetsLoss: '/interface/application/performance/location/packetsLoss',
|
2022-08-12 15:25:54 +08:00
|
|
|
|
packetsRetrains: '/interface/application/performance/location/packetsRetrains'
|
2022-08-08 17:45:50 +08:00
|
|
|
|
},
|
|
|
|
|
|
events: {
|
2022-08-11 16:45:48 +08:00
|
|
|
|
list: '/interface/overview/event/list',
|
|
|
|
|
|
recentEvents: '/interface/overview/event/recentEvents',
|
2022-08-24 16:58:34 +08:00
|
|
|
|
recentEventsD: '/interface/application/performance/overview/drilldown/dimension/recentEvents',
|
2022-08-11 16:45:48 +08:00
|
|
|
|
dimensionEvents: '/interface/overview/event/dimensionEvents'
|
2022-08-08 17:45:50 +08:00
|
|
|
|
}
|
2022-09-10 23:13:42 +08:00
|
|
|
|
},
|
|
|
|
|
|
linkMonitor: {
|
2022-09-15 15:51:00 +08:00
|
|
|
|
links: '/interface/linkMonitor/links',
|
2022-09-27 17:47:17 +08:00
|
|
|
|
totalTrafficAnalysis: '/interface/link/overview/drilldown/totalTrafficAnalysis',
|
|
|
|
|
|
networkAnalysis: '/interface/link/overview/drilldown/networkAnalysis',
|
2022-09-26 15:53:57 +08:00
|
|
|
|
linkTrafficDirection: '/interface/linkMonitor/linkTrafficDirection',
|
|
|
|
|
|
quadrupleIngressAnalysis: '/interface/link/overview/quadrupleIngressAnalysis', // 入口
|
2022-09-28 15:35:03 +08:00
|
|
|
|
quadrupleEgressAnalysis: '/interface/link/overview/quadrupleEgressAnalysis', // 出口
|
|
|
|
|
|
bigramAnalysis: '/interface/link/overview/bigramAnalysis',
|
|
|
|
|
|
bigramNextHopAnalysis: '/interface/link/overview/bigramNextHopAnalysis',
|
2022-09-30 14:16:23 +08:00
|
|
|
|
analysis: '/interface/link/overview/analysis',
|
|
|
|
|
|
nextHopAnalysis: '/interface/link/overview/nextHopAnalysis',
|
2022-10-13 15:43:48 +08:00
|
|
|
|
drilldownQuadrupleIngressAnalysis: '/interface/link/overview/drilldown/quadrupleIngressAnalysis',
|
2023-06-01 14:05:25 +08:00
|
|
|
|
drilldownQquadrupleEgressAnalysis: '/interface/link/overview/drilldown/quadrupleEgressAnalysis'
|
2022-09-15 16:29:42 +08:00
|
|
|
|
},
|
|
|
|
|
|
dnsInsight: {
|
|
|
|
|
|
recentEvents: '/interface/dnsInsight/recentEvents',
|
2022-09-20 17:20:48 +08:00
|
|
|
|
activeMaliciousDomain: '/interface/dnsInsight/activeMaliciousDomain',
|
2022-09-21 10:42:19 +08:00
|
|
|
|
totalTrafficAnalysis: '/interface/dns/overview/totalTrafficAnalysis',
|
2022-10-18 19:14:08 +08:00
|
|
|
|
eventChart: '/interface/dnsInsight/eventChart',
|
|
|
|
|
|
drilldownTrafficAnalysis: '/interface/dns/overview/drilldown/trafficAnalysis'
|
2023-04-26 18:06:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
entity: {
|
2023-06-12 10:51:56 +08:00
|
|
|
|
throughput: apiVersion + '/entity/detail/traffic/throughput',
|
|
|
|
|
|
security: apiVersion + '/entity/detail/event/security',
|
|
|
|
|
|
performance: apiVersion + '/entity/detail/event/performance',
|
2023-10-20 17:41:01 +08:00
|
|
|
|
behaviorPattern: apiVersion + '/entity/detail/behavior/ip',
|
2023-06-12 10:51:56 +08:00
|
|
|
|
// 域名解析:ip相关app、domain
|
|
|
|
|
|
domainNameResolutionAboutAppsOfIp: apiVersion + '/entity/detail/ip/relate/apps',
|
|
|
|
|
|
domainNameResolutionAboutDomainsOfIp: apiVersion + '/entity/detail/ip/relate/domains',
|
|
|
|
|
|
// 域名解析:app相关ip、domain
|
|
|
|
|
|
domainNameResolutionAboutIpsOfApp: apiVersion + '/entity/detail/app/relate/ips',
|
|
|
|
|
|
domainNameResolutionAboutDomainsOfApp: apiVersion + '/entity/detail/app/relate/domains',
|
|
|
|
|
|
// 域名解析:domain相关ip、app、fqdn
|
|
|
|
|
|
domainNameResolutionAboutAppsOfDomain: apiVersion + '/entity/detail/domain/relate/apps',
|
|
|
|
|
|
domainNameResolutionAboutIpsOfDomain: apiVersion + '/entity/detail/domain/relate/ips',
|
|
|
|
|
|
domainNameResolutionAboutFQDNsOfDomain: apiVersion + '/entity/detail/domain/relate/fqdns',
|
2023-12-06 17:30:45 +08:00
|
|
|
|
// subscriber
|
|
|
|
|
|
subscriberKpi: apiVersion + '/entity/detail/traffic/overview/subscriber',
|
|
|
|
|
|
subscriberTopApp: apiVersion + '/entity/detail/subscriber/relate/apps',
|
2023-06-12 10:51:56 +08:00
|
|
|
|
// 开放端口:ip、domain、app相关
|
|
|
|
|
|
openPortOfIp: apiVersion + '/entity/detail/ip/relate/ports',
|
|
|
|
|
|
openPortOfDomain: apiVersion + '/entity/detail/domain/relate/ports',
|
|
|
|
|
|
openPortOfApp: apiVersion + '/entity/detail/app/relate/ports',
|
|
|
|
|
|
basicInfo: apiVersion + '/entity/detail/basic',
|
|
|
|
|
|
tags: apiVersion + '/entity/detail/kb/intelligence/tag',
|
2023-06-29 14:40:50 +08:00
|
|
|
|
informationAggregation: apiVersion + '/entity/detail/kb/intelligence/list',
|
2023-12-06 17:30:45 +08:00
|
|
|
|
deviceInformation: apiVersion + '/entity/detail/subscriber/device', // 暂时写的值
|
|
|
|
|
|
accountInformation: apiVersion + '/entity/detail/subscriber/account', // 暂时写的值
|
2023-12-06 18:23:59 +08:00
|
|
|
|
locationTrack: apiVersion + '/entity/detail/subscriber/track',
|
2023-06-29 14:40:50 +08:00
|
|
|
|
// 实体关系
|
|
|
|
|
|
entityGraph: {
|
2023-07-09 21:51:05 +08:00
|
|
|
|
basicInfo: apiVersion + '/entity/graph/relation/basic',
|
|
|
|
|
|
tags: apiVersion + '/entity/graph/relation/kb/intelligence/tag',
|
2023-06-30 18:43:02 +08:00
|
|
|
|
relatedEntityCount: apiVersion + '/entity/graph/relation/summaryCount',
|
|
|
|
|
|
domainRelatedIp: apiVersion + '/entity/graph/relation/domain/relate/ips',
|
|
|
|
|
|
domainRelatedApp: apiVersion + '/entity/graph/relation/domain/relate/apps',
|
|
|
|
|
|
domainRelatedSubdomain: apiVersion + '/entity/graph/relation/domain/relate/subdomains',
|
|
|
|
|
|
ipRelatedDomain: apiVersion + '/entity/graph/relation/ip/relate/domains',
|
|
|
|
|
|
ipRelatedApp: apiVersion + '/entity/graph/relation/ip/relate/apps',
|
|
|
|
|
|
appRelatedIp: apiVersion + '/entity/graph/relation/app/relate/ips',
|
2023-07-13 16:41:31 +08:00
|
|
|
|
appRelatedDomain: apiVersion + '/entity/graph/relation/app/relate/domains'
|
2023-07-07 17:22:51 +08:00
|
|
|
|
},
|
|
|
|
|
|
entityList: {
|
|
|
|
|
|
list: apiVersion + '/entity/explorer/query/list', // 实体列表
|
|
|
|
|
|
domainBasicInfo: apiVersion + '/entity/explorer/detail/basic/domain', // Domain实体响应结果
|
|
|
|
|
|
ipBasicInfo: apiVersion + '/entity/explorer/detail/basic/ip', // ip实体响应
|
|
|
|
|
|
appBasicInfo: apiVersion + '/entity/explorer/detail/basic/app', // app实体响应
|
|
|
|
|
|
domainTags: apiVersion + '/entity/explorer/detail/kb/intelligence/tag/domain', // Domain实体标签响应结果
|
|
|
|
|
|
ipTags: apiVersion + '/entity/explorer/detail/kb/intelligence/tag/ip', // ip实体标签响应结果
|
|
|
|
|
|
appTags: apiVersion + '/entity/explorer/detail/kb/intelligence/tag/app', // app实体标签响应结果
|
|
|
|
|
|
domainThroughput: apiVersion + '/entity/explorer/detail/traffic/throughput/domain', // 实体流量信息
|
|
|
|
|
|
ipThroughput: apiVersion + '/entity/explorer/detail/traffic/throughput/ip', // 实体流量信息
|
|
|
|
|
|
appThroughput: apiVersion + '/entity/explorer/detail/traffic/throughput/app', // 实体流量信息
|
|
|
|
|
|
domainPerformance: apiVersion + '/entity/explorer/detail/traffic/performance/domain', // domain网络质量
|
|
|
|
|
|
ipPerformance: apiVersion + '/entity/explorer/detail/traffic/performance/ip', // ip网络质量
|
|
|
|
|
|
appPerformance: apiVersion + '/entity/explorer/detail/traffic/performance/app', // app网络质量
|
|
|
|
|
|
domainRelatedApp: apiVersion + '/entity/explorer/detail/domain/relate/apps', // 域名相关app
|
|
|
|
|
|
domainRelatedIp: apiVersion + '/entity/explorer/detail/domain/relate/ips', // 域名相关ip
|
|
|
|
|
|
appRelatedDomain: apiVersion + '/entity/explorer/detail/app/relate/domains', // app相关域名
|
|
|
|
|
|
appRelatedIp: apiVersion + '/entity/explorer/detail/app/relate/ips', // app相关ip
|
|
|
|
|
|
ipRelatedApp: apiVersion + '/entity/explorer/detail/ip/relate/apps', // ip相关app
|
|
|
|
|
|
ipRelatedDomain: apiVersion + '/entity/explorer/detail/ip/relate/domains', // ip相关域名
|
|
|
|
|
|
ipRelatedPort: apiVersion + '/entity/explorer/detail/ip/relate/ports', // ip开放端口
|
|
|
|
|
|
domainTrafficMap: apiVersion + '/entity/explorer/detail/traffic/map/domain', // domain流量地图
|
|
|
|
|
|
ipTrafficMap: apiVersion + '/entity/explorer/detail/traffic/map/ip', // ip流量地图
|
|
|
|
|
|
appTrafficMap: apiVersion + '/entity/explorer/detail/traffic/map/app', // app流量地图
|
|
|
|
|
|
summaryCount: apiVersion + '/entity/explorer/query/summaryCount', // 实体基数统计
|
|
|
|
|
|
aggCountry: apiVersion + '/entity/explorer/top/aggCountry', // 国家实体基数统计
|
2023-08-22 10:34:18 +08:00
|
|
|
|
aggIPAsn: apiVersion + '/entity/explorer/top/agg-ip-asn', // ASN实体基数统计
|
2023-07-07 17:22:51 +08:00
|
|
|
|
aggCity: apiVersion + '/entity/explorer/top/aggCity', // 城市实体基数统计
|
2023-08-22 10:34:18 +08:00
|
|
|
|
aggIPIsp: apiVersion + '/entity/explorer/top/agg-ip-isp', // ip-iap实体基数统计
|
|
|
|
|
|
aggPort: apiVersion + '/entity/explorer/top/aggPort', // 端口实体基数统计
|
2023-08-23 14:39:28 +08:00
|
|
|
|
aggDomain: apiVersion + '/entity/explorer/top/aggDomainCategory', // 域名类别实体基数统计
|
2023-08-22 10:34:18 +08:00
|
|
|
|
aggAppCategory: apiVersion + '/entity/explorer/top/aggAppCategory', // app类别实体基数统计
|
|
|
|
|
|
aggTag: apiVersion + '/entity/explorer/top/aggTag', // 标签实体基数统计
|
2023-07-07 17:22:51 +08:00
|
|
|
|
domainSecurity: apiVersion + '/entity/explorer/detail/event/security/domain', // domain安全事件详情
|
2023-09-13 14:59:31 +08:00
|
|
|
|
ipSecurity: apiVersion + '/entity/explorer/detail/event/security/ip', // ip安全事件详情
|
|
|
|
|
|
appSecurity: apiVersion + '/entity/explorer/detail/event/security/app', // app安全事件详情
|
2023-07-07 17:22:51 +08:00
|
|
|
|
domainEventPerformance: apiVersion + '/entity/explorer/detail/event/performance/domain', // domain服务质量详情
|
|
|
|
|
|
ipEventPerformance: apiVersion + '/entity/explorer/detail/event/performance/ip', // ip服务质量详情
|
|
|
|
|
|
appEventPerformance: apiVersion + '/entity/explorer/detail/event/performance/app', // app服务质量详情
|
|
|
|
|
|
entityActive: apiVersion + '/entity/explorer/overview/active', // entity首页active数据概览
|
|
|
|
|
|
entityNew: apiVersion + '/entity/explorer/overview/new', // entity首页new数据概览
|
|
|
|
|
|
entityTotal: apiVersion + '/entity/explorer/overview/total' // entity首页total数据概览
|
2023-06-29 14:40:50 +08:00
|
|
|
|
}
|
2022-03-07 17:27:55 +08:00
|
|
|
|
}
|
2021-06-15 09:25:10 +08:00
|
|
|
|
}
|
2021-08-13 09:39:02 +08:00
|
|
|
|
|
2021-06-20 13:31:55 +08:00
|
|
|
|
/* panel */
|
2021-06-11 23:00:33 +08:00
|
|
|
|
export async function getPanelList (params) {
|
2021-06-15 09:25:10 +08:00
|
|
|
|
return await getData(api.panel, params, true)
|
2021-06-11 23:00:33 +08:00
|
|
|
|
}
|
2021-06-20 13:31:55 +08:00
|
|
|
|
export async function getPanel (id) {
|
|
|
|
|
|
return await getData(`${api.chart}/${id}`)
|
|
|
|
|
|
}
|
|
|
|
|
|
/* chart */
|
|
|
|
|
|
export async function getChartList (params) {
|
|
|
|
|
|
return await getData(api.chart, params, true)
|
|
|
|
|
|
}
|
|
|
|
|
|
export async function getChart (id) {
|
|
|
|
|
|
return await getData(`${api.chart}/${id}`)
|
2021-06-11 23:00:33 +08:00
|
|
|
|
}
|
2021-08-11 22:14:23 +08:00
|
|
|
|
/* entity列表 */
|
|
|
|
|
|
export async function getEntityList (params) {
|
|
|
|
|
|
return await getData(api.entityList, params, true)
|
2021-07-07 22:58:52 +08:00
|
|
|
|
}
|
2021-08-11 22:14:23 +08:00
|
|
|
|
/* entity总数 */
|
|
|
|
|
|
export async function getEntityCount (params) {
|
|
|
|
|
|
return await getData(api.entityCount, params)
|
2021-07-09 10:10:06 +08:00
|
|
|
|
}
|
2021-08-11 22:14:23 +08:00
|
|
|
|
/* ip类型entity过滤器数据 */
|
|
|
|
|
|
export async function getEntityFilter (params) {
|
|
|
|
|
|
return await getData(api.entityFilter, params, true)
|
2021-07-09 10:10:06 +08:00
|
|
|
|
}
|
2021-06-22 21:19:04 +08:00
|
|
|
|
/* 字典 */
|
|
|
|
|
|
export async function getDictList (params) {
|
|
|
|
|
|
return await getData(api.dict, params, true)
|
|
|
|
|
|
}
|
2022-03-12 16:56:46 +08:00
|
|
|
|
function handleResult (response) {
|
2023-08-25 11:43:46 +08:00
|
|
|
|
if (response.data && (response.data.list || response.data.result)) {
|
2022-03-12 16:56:46 +08:00
|
|
|
|
return response.data.list || response.data.result
|
2023-08-25 11:43:46 +08:00
|
|
|
|
} else if (response.data && response.data.result === 0) {
|
2022-03-12 16:56:46 +08:00
|
|
|
|
return response.data.result
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return response.data
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-06-20 13:31:55 +08:00
|
|
|
|
export async function getData (url, params = {}, isQueryList) {
|
2021-08-11 22:14:23 +08:00
|
|
|
|
const request = new Promise((resolve, reject) => {
|
|
|
|
|
|
try {
|
2023-08-24 17:15:41 +08:00
|
|
|
|
axios.get(url, { params }).then(response => {
|
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
|
resolve(handleResult(response.data))
|
2021-08-11 22:14:23 +08:00
|
|
|
|
} else {
|
2023-08-24 17:15:41 +08:00
|
|
|
|
reject(response.data)
|
2021-08-11 22:14:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
reject(e)
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(response => {
|
|
|
|
|
|
console.error(response)
|
2021-06-11 23:00:33 +08:00
|
|
|
|
})
|
|
|
|
|
|
return await request
|
|
|
|
|
|
}
|
2021-06-22 21:19:04 +08:00
|
|
|
|
|
|
|
|
|
|
export async function getPermission () {
|
2023-08-25 11:43:46 +08:00
|
|
|
|
const request = new Promise((resolve, reject) => {
|
2023-08-24 17:15:41 +08:00
|
|
|
|
axios.post(api.permission, { token: localStorage.getItem(storageKey.token) }).then(response => {
|
2023-08-25 11:43:46 +08:00
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
|
resolve({
|
|
|
|
|
|
menuList: sortByOrderNum(response.data.data.menus),
|
|
|
|
|
|
buttonList: response.data.data.buttons,
|
|
|
|
|
|
roleList: response.data.data.roles
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
reject(response.data)
|
|
|
|
|
|
}
|
2021-06-22 21:19:04 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
return await request
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export async function getI18n () {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
const dictData = await getDictList({ type: 'lang' })
|
2023-08-25 11:43:46 +08:00
|
|
|
|
if (dictData) {
|
|
|
|
|
|
const langs = dictData.map(d => d.value).join(',')
|
|
|
|
|
|
localStorage.setItem(storageKey.languages, langs)
|
|
|
|
|
|
const request = new Promise(resolve => {
|
|
|
|
|
|
axios.get(api.i18nLang, { params: { l: langs } }).then(response => {
|
|
|
|
|
|
response.data.data.cn = response.data.data.zh
|
|
|
|
|
|
resolve(response.data.data)
|
|
|
|
|
|
})
|
2021-06-22 21:19:04 +08:00
|
|
|
|
})
|
2023-08-25 11:43:46 +08:00
|
|
|
|
return await request
|
|
|
|
|
|
}
|
|
|
|
|
|
return null
|
2021-06-22 21:19:04 +08:00
|
|
|
|
}
|
2021-07-01 15:39:48 +08:00
|
|
|
|
|
2021-07-05 17:40:43 +08:00
|
|
|
|
/* 获得原始的3611-2 json字符串数据 */
|
|
|
|
|
|
export async function getIso36112JsonData (suffix) {
|
2023-02-03 11:08:35 +08:00
|
|
|
|
const url = `${window.location.protocol}//${window.location.host}/geojson/${suffix}.json`
|
2021-07-05 17:40:43 +08:00
|
|
|
|
const request = new Promise(resolve => {
|
2023-02-03 11:08:35 +08:00
|
|
|
|
axios({ url }).then(response => {
|
2021-10-16 15:50:12 +08:00
|
|
|
|
resolve(response.data || response || null)
|
2023-02-03 11:08:35 +08:00
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
console.error(err)
|
2021-07-05 17:40:43 +08:00
|
|
|
|
})
|
2021-07-01 15:39:48 +08:00
|
|
|
|
})
|
2021-07-05 17:40:43 +08:00
|
|
|
|
return await request
|
2021-07-01 15:39:48 +08:00
|
|
|
|
}
|