Skip to content

Commit

Permalink
minor: APM相关耗时指标图表title统一 (#3012)
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 18595
  • Loading branch information
liuwenping authored Sep 17, 2024
1 parent d4276c8 commit 11fb30a
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion bkmonitor/packages/apm_web/metric/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class StatisticsMetric(ChoicesEnum):
_choices_labels = (
(REQUEST_COUNT, "请求数"),
(ERROR_COUNT, "错误数"),
(AVG_DURATION, "响应耗时"),
(AVG_DURATION, "耗时"),
)


Expand Down
5 changes: 2 additions & 3 deletions bkmonitor/packages/apm_web/metric/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,6 @@ class RequestSerializer(serializers.Serializer):
category = serializers.CharField(label="分类", required=False)

def perform_request(self, validated_data):

# 获取存储周期
app = Application.objects.get(bk_biz_id=validated_data["bk_biz_id"], app_name=validated_data["app_name"])
start_time, end_time = get_datetime_range(period="day", distance=app.es_retention, rounding=False)
Expand Down Expand Up @@ -1354,7 +1353,7 @@ def perform_request(self, validated_request_data):
"sort": [
{"id": "request_count", "status": "request_count", "name": _lazy("请求数量"), "tips": _lazy("请求数量")},
{"id": "error_count", "status": "error_count", "name": _lazy("错误数量"), "tips": _lazy("错误数量")},
{"id": "avg_duration", "status": "avg_duration", "name": _lazy("响应耗时"), "tips": _lazy("响应耗时")},
{"id": "avg_duration", "status": "avg_duration", "name": _lazy("耗时"), "tips": _lazy("耗时")},
],
}

Expand Down Expand Up @@ -1415,7 +1414,7 @@ def perform_request(self, validated_request_data):
"sort": [
{"id": "request_count", "status": "request_count", "name": _lazy("请求数量"), "tips": _lazy("请求数量")},
{"id": "error_count", "status": "error_count", "name": _lazy("错误数量"), "tips": _lazy("错误数量")},
{"id": "avg_duration", "status": "avg_duration", "name": _lazy("响应耗时"), "tips": _lazy("响应耗时")},
{"id": "avg_duration", "status": "avg_duration", "name": _lazy("耗时"), "tips": _lazy("耗时")},
],
}

Expand Down
2 changes: 1 addition & 1 deletion bkmonitor/packages/apm_web/trace/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def perform_request(self, validated_request_data):
},
{
"id": 6,
"title": _lazy("响应耗时"),
"title": _lazy("耗时"),
"gridPos": {"x": 16, "y": 16, "w": 8, "h": 4},
"type": "graph",
"targets": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 0,
"y": 12,
Expand Down Expand Up @@ -1387,7 +1387,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 0,
"y": 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
},
{
"id": 5,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,9 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"type": "apm-timeseries-chart",
"alias": "响应耗时",
"alias": "耗时",
"targets": [
{
"data_type": "time_series",
Expand Down Expand Up @@ -1678,9 +1678,9 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"type": "apm-timeseries-chart",
"alias": "响应耗时",
"alias": "耗时",
"targets": [
{
"data_type": "time_series",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down Expand Up @@ -1408,7 +1408,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down Expand Up @@ -1304,7 +1304,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,9 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"type": "apm-timeseries-chart",
"alias": "响应耗时",
"alias": "耗时",
"targets": [
{
"data_type": "time_series",
Expand Down Expand Up @@ -1677,9 +1677,9 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"type": "apm-timeseries-chart",
"alias": "响应耗时",
"alias": "耗时",
"targets": [
{
"data_type": "time_series",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 0,
"y": 12,
Expand Down Expand Up @@ -1382,7 +1382,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 0,
"y": 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down Expand Up @@ -1622,7 +1622,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 0,
"y": 12,
Expand Down Expand Up @@ -1395,7 +1395,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 0,
"y": 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down Expand Up @@ -1306,7 +1306,7 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
},
{
"id": 3,
"title": "响应耗时",
"title": "耗时",
"gridPos": {
"x": 16,
"y": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,9 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"type": "apm-timeseries-chart",
"alias": "响应耗时",
"alias": "耗时",
"targets": [
{
"data_type": "time_series",
Expand Down Expand Up @@ -1678,9 +1678,9 @@
},
{
"id": 4,
"title": "响应耗时",
"title": "耗时",
"type": "apm-timeseries-chart",
"alias": "响应耗时",
"alias": "耗时",
"targets": [
{
"data_type": "time_series",
Expand Down

0 comments on commit 11fb30a

Please sign in to comment.