fix: 修复detection下拉内容中domain和app的展示调整
This commit is contained in:
@@ -1086,3 +1086,27 @@ export function colorGradientCalculation (startColor, endColor, values) {
|
||||
export function colorHexToRgbArr (hex) {
|
||||
return [1, 3, 5].map((h) => parseInt(hex.substring(h, h + 2), 16))
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过事件类型eventType转换对应名称
|
||||
* @param type
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getNameByEventType (type) {
|
||||
switch (type) {
|
||||
case 'http error': {
|
||||
return 'http error ratio'
|
||||
}
|
||||
case 'dns error': {
|
||||
return 'dns error ratio'
|
||||
}
|
||||
case 'high dns response time': {
|
||||
return 'dns response time'
|
||||
}
|
||||
// 目前ui并未找到此类型,添加以防不测
|
||||
case 'high http resopnse time':
|
||||
default: {
|
||||
return 'http response time'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user