Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into hotfix/pjy_menu_o…
Browse files Browse the repository at this point in the history
…ption
  • Loading branch information
Counterflowwind committed Sep 23, 2021
2 parents 09b8619 + 82e11ee commit e9fa386
Show file tree
Hide file tree
Showing 75 changed files with 2,283 additions and 463 deletions.
10 changes: 2 additions & 8 deletions conf/cmp/i18n/component-protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ zh:
error: 错误
danger: 危险
custom: 自定义
containerRuntimeVersion: 容器运行时版本
containerRuntimeVersion: 容器运行环境
kernelVersion: Kernel 版本
kubeProxyVersion: Kubectl 代理版本
kubeletVersion: Kubelet 版本
Expand Down Expand Up @@ -169,7 +169,6 @@ zh:
e.g.: 例如
Cpu Chart: CPU
annotation: 注释
containerRuntime: 容器运行时
placeholderFilterByNodeName: 按节点名称过滤
cpuUsage: CPU 使用率
SchedulingDisabled: 冻结
Expand All @@ -196,6 +195,7 @@ zh:
status update success: 状态修改成功
Cordon following nodes: 冻结以下节点:
Uncordon following nodes: 解冻以下节点:
show: 查看


en:
Expand Down Expand Up @@ -327,7 +327,6 @@ en:
systemUUID: System UUID
use: Usage
annotation: Annotation
containerRuntime: Container Runtime
placeholderFilterByNodeName: filter by node name
cpuUsage: CPU Usage
architecture: Architecture
Expand All @@ -344,10 +343,5 @@ en:
env-label: Enviorment Label
job-label: Job Label
other-label: Other Label
# value empty required, do not delete
NetworkUnavailable:
MemoryPressure:
DiskPressure:
PIDPressure:
cpu-size: CPU Cores
memory-size: Memeory Size
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
}
},
{
"w": 8,
"w": 12,
"h": 9,
"x": 0,
"y": 9,
Expand Down Expand Up @@ -668,9 +668,9 @@
}
},
{
"w": 8,
"w": 12,
"h": 9,
"x": 8,
"x": 12,
"y": 9,
"i": "view-QWRT8bM3",
"view": {
Expand Down
114 changes: 82 additions & 32 deletions conf/monitor/monitor/chartview/cmp/cmp-dashboard-podDetail.json
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,11 @@
"y": 9,
"i": "view-jLdXS0f5",
"view": {
"title": "Pod Read Bytes",
"title": "Pod Disk IO",
"i18n": {
"title": {
"zh": "Pod 读字节数",
"en": "Pod Read Bytes"
"zh": "Pod 磁盘读写字节数",
"en": "Pod Disk Read/Write Bytes"
}
},
"description": "",
Expand Down Expand Up @@ -520,15 +520,33 @@
"valueDimensions": [
{
"aggregation": "sum",
"alias": "Disk Output Bytes",
"alias": "磁盘读取字节数",
"i18n": {
"title": {
"zh": "磁盘写出字节数",
"en": "Disk Output Bytes"
"alias": {
"zh": "Pod 磁盘读字节数",
"en": "Pod Disk Read Bytes"
}
},
"field": "docker_container_summary-blk_read_bytes::field",
"key": "valuel1zBrf4M",
"key": "valueBIzQwLfx",
"resultType": "number",
"type": "field",
"unit": {
"type": "CAPACITY",
"unit": "B"
}
},
{
"aggregation": "sum",
"alias": "磁盘写入字节数",
"i18n": {
"alias": {
"zh": "Pod 磁盘写字节数",
"en": "Pod Disk Write Bytes"
}
},
"field": "docker_container_summary-blk_write_bytes::field",
"key": "valueEl8TIM1a",
"resultType": "number",
"type": "field",
"unit": {
Expand All @@ -543,6 +561,9 @@
},
"option": {
"yAxis": [
{
"name": ""
},
{
"name": ""
}
Expand Down Expand Up @@ -573,8 +594,12 @@
"expr": "pod_name::tag"
},
{
"alias": "valuel1zBrf4M",
"alias": "valueBIzQwLfx",
"expr": "round_float(sum(blk_read_bytes::field), 2)"
},
{
"alias": "valueEl8TIM1a",
"expr": "round_float(sum(blk_write_bytes::field), 2)"
}
],
"where": [
Expand Down Expand Up @@ -604,11 +629,11 @@
"y": 9,
"i": "view-dVHW28yb",
"view": {
"title": "Pod Write Bytes",
"title": "Pod Network IO",
"i18n": {
"title": {
"zh": "Pod 写字节数",
"en": "Pod Write Bytes"
"zh": "Pod 网络收发字节数",
"en": "Pod Network Received/Transmitted bytes"
}
},
"description": "",
Expand All @@ -624,19 +649,19 @@
"isSqlMode": false,
"resultFilters": [
{
"alias": "Pod Namespace",
"alias": "Pod Name",
"field": "docker_container_summary-pod_name::tag",
"i18n": {
"title": {
"zh": "Pod 命名空间",
"en": "Pod Namespace"
"zh": "Pod 名称",
"en": "Pod Name"
}
},
"field": "docker_container_summary-pod_namespace::tag",
"filter": {
"operation": "=",
"value": "{{namespace}}"
"value": "{{podName}}"
},
"key": "filterb66pIvp0",
"key": "filterhDGReMpM",
"resultType": "string",
"type": "filter"
},
Expand All @@ -658,19 +683,19 @@
"type": "filter"
},
{
"alias": "Pod Name",
"alias": "Pod Namespace",
"i18n": {
"title": {
"zh": "Pod 名称",
"en": "Pod Name"
"zh": "Pod 命名空间",
"en": "Pod Namespace"
}
},
"field": "docker_container_summary-pod_name::tag",
"field": "docker_container_summary-pod_namespace::tag",
"filter": {
"operation": "=",
"value": "{{podName}}"
"value": "{{namespace}}"
},
"key": "filterhDGReMpM",
"key": "filterb66pIvp0",
"resultType": "string",
"type": "filter"
}
Expand Down Expand Up @@ -717,15 +742,33 @@
"valueDimensions": [
{
"aggregation": "sum",
"alias": "Disk Input Bytes",
"alias": "Received Bytes",
"i18n": {
"title": {
"zh": "磁盘写入字节数",
"en": "Disk Input Bytes"
"alias": {
"zh": "Pod 网络接收字节数",
"en": "Pod Network Received Bytes"
}
},
"field": "docker_container_summary-blk_write_bytes::field",
"key": "valuemtp5GDlx",
"field": "docker_container_summary-rx_bytes::field",
"key": "valueU9qop1U7",
"resultType": "number",
"type": "field",
"unit": {
"type": "CAPACITY",
"unit": "B"
}
},
{
"aggregation": "sum",
"alias": "Transmitted Bytes",
"i18n": {
"alias": {
"zh": "Pod 网络传输字节数",
"en": "Pod Network Transmitted Bytes"
}
},
"field": "docker_container_summary-tx_bytes::field",
"key": "value9z9ayiEX",
"resultType": "number",
"type": "field",
"unit": {
Expand All @@ -740,6 +783,9 @@
},
"option": {
"yAxis": [
{
"name": ""
},
{
"name": ""
}
Expand Down Expand Up @@ -770,8 +816,12 @@
"expr": "pod_name::tag"
},
{
"alias": "valuemtp5GDlx",
"expr": "round_float(sum(blk_write_bytes::field), 2)"
"alias": "valueU9qop1U7",
"expr": "round_float(sum(rx_bytes::field), 2)"
},
{
"alias": "value9z9ayiEX",
"expr": "round_float(sum(tx_bytes::field), 2)"
}
],
"where": [
Expand Down
1 change: 1 addition & 0 deletions erda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ envs:
DOP_ADDR: dop:9527
CORE_SERVICES_ADDR: core-services:9526
OPENAPI_ADDR: openapi:9529
CMP_ADDR: cmp:9027
services:
action-runner-scheduler:
cmd: "/app/action-runner-scheduler"
Expand Down
6 changes: 1 addition & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
Expand Down Expand Up @@ -1988,7 +1987,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 h1:/6y1LfuqNuQdHAm0jjtPtgRcxIxjVZgm5OTu8/QhZvk=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
Expand Down Expand Up @@ -2115,7 +2113,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 h1:7ZDGnxgHAMw7thfC5bEos0RDAccZKxioiWBhfIe+tvw=
golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down Expand Up @@ -2226,9 +2223,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6 h1:SIasE1FVIQOWz2GEAHFOmoW7xchJcqlucjSULTL0Ag4=
golang.org/x/tools v0.1.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
4 changes: 2 additions & 2 deletions modules/cmp/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ package cache

import (
"container/heap"
"encoding/json"
"fmt"
"sort"
"strings"
"sync"
"time"

"github.com/cespare/xxhash"
jsi "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"modernc.org/mathutil"
Expand Down Expand Up @@ -554,7 +554,7 @@ func GenerateKey(keys []string) string {
}

func MarshalValue(o interface{}) (Values, error) {
d, err := json.Marshal(o)
d, err := jsi.Marshal(o)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
package eventTable

import (
"context"

"github.com/erda-project/erda-infra/providers/component-protocol/cptype"
"github.com/erda-project/erda/modules/cmp"

"github.com/erda-project/erda/bundle"
"github.com/erda-project/erda/modules/openapi/component-protocol/components/base"
)

type ComponentEventTable struct {
base.DefaultProvider
sdk *cptype.SDK
bdl *bundle.Bundle
sdk *cptype.SDK
ctx context.Context
server cmp.SteveServer

Type string `json:"type,omitempty"`
State State `json:"state,omitempty"`
Expand Down
Loading

0 comments on commit e9fa386

Please sign in to comment.