Skip to content

Commit

Permalink
Merge branch 'master' of github.com:didi/nightingale
Browse files Browse the repository at this point in the history
  • Loading branch information
710leo committed Apr 16, 2020
2 parents 0b2d4d6 + a3d956f commit b50b85f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
File renamed without changes.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pub/index-5b1dc2bce20c53085703.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pub/index-b7ceea40b07d28a3e0c9.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion pub/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html><head><meta charset="UTF-8"><title>Nightingale</title><link rel="shortcut icon" href="/favicon.ico"><link href="/index-b7ceea40b07d28a3e0c9.css" rel="stylesheet"></head><body><div id="react-content"></div><script src="/lib-033bee8514de110e36ef.dll.js"></script><script src="/index-b7ceea40b07d28a3e0c9.js"></script></body></html>
<!doctype html><html><head><meta charset="UTF-8"><title>Nightingale</title><link rel="shortcut icon" href="/favicon.ico"><link href="/index-5b1dc2bce20c53085703.css" rel="stylesheet"></head><body><div id="react-content"></div><script src="/lib-033bee8514de110e36ef.dll.js"></script><script src="/index-5b1dc2bce20c53085703.js"></script></body></html>
5 changes: 4 additions & 1 deletion src/modules/judge/judge/nodata.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func nodataJudge() {
Endpoint: endpoint,
Metric: stra.Exprs[0].Metric,
Tags: "",
TagsMap: map[string]string{},
DsType: "GAUGE",
}

Expand All @@ -56,7 +57,8 @@ func nodataJudge() {

for _, data := range respData {
var metric, tag string
arr := strings.Split(data.Counter, "/")
// 兼容格式disk.bytes.free/mount=/data/docker/overlay2/xxx/merged
arr := strings.SplitN(data.Counter, "/", 2)
if len(arr) == 2 {
metric = arr[0]
tag = arr[1]
Expand All @@ -71,6 +73,7 @@ func nodataJudge() {
Endpoint: data.Endpoint,
Metric: metric,
Tags: tag,
TagsMap: dataobj.DictedTagstring(tag),
DsType: data.DsType,
Step: data.Step,
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Graph/services.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function fetchMetrics(selectedEndpoint: Endpoints, endpoints: Endpoints)
endpoints: selectedEndpoint,
}),
}, false).then((data) => {
return _.chain(data.metrics).flattenDeep().union().sortBy((o) => {
return _.chain(data.metrics).compact().flattenDeep().union().sortBy((o) => {
return _.lowerCase(o);
}).value();
});
Expand Down

0 comments on commit b50b85f

Please sign in to comment.