2021-06-11 10:00:22 +08:00
|
|
|
export const defaultPageSize = 20
|
|
|
|
|
|
2021-06-22 21:19:04 +08:00
|
|
|
export const storageKey = {
|
2021-07-05 17:40:43 +08:00
|
|
|
iso36112Capital: 'cn-iso3611-2-capital',
|
|
|
|
|
iso36112WorldLow: 'cn-iso3611-2-world-low',
|
2021-06-22 21:19:04 +08:00
|
|
|
i18n: 'cn-i18n',
|
2021-07-23 11:19:10 +08:00
|
|
|
languages: 'cn-languages',
|
2021-06-22 21:19:04 +08:00
|
|
|
language: 'cn-language',
|
|
|
|
|
timezone: 'cn-timezone',
|
|
|
|
|
timezoneOffset: 'cn-timezone-offset',
|
|
|
|
|
timezoneLocalOffset: 'cn-timezone-local-offset',
|
|
|
|
|
token: 'cn-token',
|
|
|
|
|
username: 'cn-username',
|
|
|
|
|
sysName: 'cn-sys-name',
|
|
|
|
|
sysLogo: 'cn-sys-logo',
|
|
|
|
|
tableTitlePrefix: 'cn-table-title',
|
|
|
|
|
tablePageSizePrefix: 'cn-page-size',
|
|
|
|
|
leftMenuShrink: 'cn-left-menu-shrink',
|
|
|
|
|
unsavedChange: 'cn-unsaved-change'
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-05 17:40:43 +08:00
|
|
|
export const iso36112 = {
|
|
|
|
|
[storageKey.iso36112Capital]: 'data/countriesWithCapital.json',
|
|
|
|
|
[storageKey.iso36112WorldLow]: 'worldChinaLow.json'
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-11 10:00:22 +08:00
|
|
|
// 统一定义跳转来源
|
|
|
|
|
export const fromRoute = {
|
|
|
|
|
trafficSummary: 'trafficSummary',
|
2021-06-11 23:00:33 +08:00
|
|
|
networkAppPerformance: 'networkAppPerformance',
|
|
|
|
|
dnsServiceInsights: 'dnsServiceInsights',
|
2021-06-11 10:00:22 +08:00
|
|
|
user: 'user'
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-11 23:00:33 +08:00
|
|
|
/* panel类别和路由之间的映射 */
|
|
|
|
|
export const panelTypeAndRouteMapping = {
|
|
|
|
|
trafficSummary: 1,
|
|
|
|
|
networkAppPerformance: 2,
|
|
|
|
|
dnsServiceInsights: 3
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-11 10:00:22 +08:00
|
|
|
export const position = {
|
|
|
|
|
tableHeight: {
|
|
|
|
|
normal: 'calc(100% - 48px)' // 常规高度,特例在下方定义
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-06-21 20:33:39 +08:00
|
|
|
|
2021-07-07 22:58:52 +08:00
|
|
|
export const entityType = {
|
|
|
|
|
ip: 'IP',
|
|
|
|
|
domain: 'Domain',
|
|
|
|
|
app: 'APP'
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-09 17:24:22 +08:00
|
|
|
export const entityTypeMappingKey = {
|
|
|
|
|
ip: ['country', 'region']
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-21 22:46:08 +08:00
|
|
|
export const unitTypes = {
|
|
|
|
|
time: 'time',
|
|
|
|
|
number: 'number',
|
|
|
|
|
byte: 'byte'
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 20:33:39 +08:00
|
|
|
export const chartTableDefaultPageSize = 10 // table类型图表默认每页数据量
|
2021-06-22 21:19:04 +08:00
|
|
|
export const chartTableTopOptions = [10, 100] // table类型图表的TOP-N选项
|
2021-07-07 15:51:52 +08:00
|
|
|
export const chartPieTableTopOptions = [{ name: 'Sessions', value: 'sessions' }, { name: 'Packets', value: 'packets' }, { name: 'Bytes', value: 'bytes' }] // table类型图表的TOP-N选项
|