格式化部分图表中的数字

This commit is contained in:
GoEdgeLab
2022-03-14 12:04:46 +08:00
parent e9ee204d18
commit 0dce5468f4
3 changed files with 6 additions and 6 deletions

View File

@@ -193,7 +193,7 @@ Tea.context(function () {
attackRatio = Math.round(stats[index].countAttackRequests * 10000 / stats[index].countRequests) / 100
}
return stats[index].day + " " + stats[index].hour + "时<br/>总请求数:" + stats[index].countRequests + "<br/>缓存请求数:" + stats[index].countCachedRequests + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + stats[index].countAttackRequests + "<br/>拦截比例:" + attackRatio + "%"
return stats[index].day + " " + stats[index].hour + "时<br/>总请求数:" + teaweb.formatNumber(stats[index].countRequests) + "<br/>缓存请求数:" + teaweb.formatNumber(stats[index].countCachedRequests) + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + teaweb.formatNumber(stats[index].countAttackRequests) + "<br/>拦截比例:" + attackRatio + "%"
})
}
@@ -208,7 +208,7 @@ Tea.context(function () {
attackRatio = Math.round(stats[index].countAttackRequests * 10000 / stats[index].countRequests) / 100
}
return stats[index].day + "<br/>总请求数:" + stats[index].countRequests + "<br/>缓存请求数:" + stats[index].countCachedRequests + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + stats[index].countAttackRequests + "<br/>拦截比例:" + attackRatio + "%"
return stats[index].day + "<br/>总请求数:" + teaweb.formatNumber(stats[index].countRequests) + "<br/>缓存请求数:" + teaweb.formatNumber(stats[index].countCachedRequests) + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + teaweb.formatNumber(stats[index].countAttackRequests) + "<br/>拦截比例:" + attackRatio + "%"
})
}

View File

@@ -252,7 +252,7 @@ Tea.context(function () {
attackRatio = Math.round(stats[index].countAttackRequests * 10000 / stats[index].countRequests) / 100
}
return stats[index].day + " " + stats[index].hour + "时<br/>总请求数:" + stats[index].countRequests + "<br/>缓存请求数:" + stats[index].countCachedRequests + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + stats[index].countAttackRequests + "<br/>拦截比例:" + attackRatio + "%"
return stats[index].day + " " + stats[index].hour + "时<br/>总请求数:" + teaweb.formatNumber(stats[index].countRequests) + "<br/>缓存请求数:" + teaweb.formatNumber(stats[index].countCachedRequests) + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + teaweb.formatNumber(stats[index].countAttackRequests) + "<br/>拦截比例:" + attackRatio + "%"
})
}
@@ -267,7 +267,7 @@ Tea.context(function () {
attackRatio = Math.round(stats[index].countAttackRequests * 10000 / stats[index].countRequests) / 100
}
return stats[index].day + "<br/>总请求数:" + stats[index].countRequests + "<br/>缓存请求数:" + stats[index].countCachedRequests + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + stats[index].countAttackRequests + "<br/>拦截比例:" + attackRatio + "%"
return stats[index].day + "<br/>总请求数:" + teaweb.formatNumber(stats[index].countRequests) + "<br/>缓存请求数:" + teaweb.formatNumber(stats[index].countCachedRequests) + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + teaweb.formatNumber(stats[index].countAttackRequests) + "<br/>拦截比例:" + attackRatio + "%"
})
}

View File

@@ -203,7 +203,7 @@ Tea.context(function () {
attackRatio = Math.round(stats[index].countAttackRequests * 10000 / stats[index].countRequests) / 100
}
return stats[index].day + " " + stats[index].hour + "时<br/>总请求数:" + stats[index].countRequests + "<br/>缓存请求数:" + stats[index].countCachedRequests + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + stats[index].countAttackRequests + "<br/>拦截比例:" + attackRatio + "%"
return stats[index].day + " " + stats[index].hour + "时<br/>总请求数:" + teaweb.formatNumber(stats[index].countRequests) + "<br/>缓存请求数:" + teaweb.formatNumber(stats[index].countCachedRequests) + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + teaweb.formatNumber(stats[index].countAttackRequests) + "<br/>拦截比例:" + attackRatio + "%"
})
}
@@ -218,7 +218,7 @@ Tea.context(function () {
attackRatio = Math.round(stats[index].countAttackRequests * 10000 / stats[index].countRequests) / 100
}
return stats[index].day + "<br/>总请求数:" + stats[index].countRequests + "<br/>缓存请求数:" + stats[index].countCachedRequests + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + stats[index].countAttackRequests + "<br/>拦截比例:" + attackRatio + "%"
return stats[index].day + "<br/>总请求数:" + teaweb.formatNumber(stats[index].countRequests) + "<br/>缓存请求数:" + teaweb.formatNumber(stats[index].countCachedRequests) + "<br/>缓存命中率:" + cachedRatio + "%<br/>拦截攻击数:" + teaweb.formatNumber(stats[index].countAttackRequests) + "<br/>拦截比例:" + attackRatio + "%"
})
}