提交 b50b85f3 编写于 作者: 7 710leo

Merge branch 'master' of github.com:didi/nightingale

{"version":3,"file":"index-5b1dc2bce20c53085703.js","sources":["webpack:///index-5b1dc2bce20c53085703.js"],"mappings":"AAAA;;;;;;;AAuhZA","sourceRoot":""}
\ No newline at end of file
{"version":3,"file":"index-b7ceea40b07d28a3e0c9.js","sources":["webpack:///index-b7ceea40b07d28a3e0c9.js"],"mappings":"AAAA;;;;;;;AAuhZA","sourceRoot":""}
\ No newline at end of file
<!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>
\ No newline at end of file
<!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>
\ No newline at end of file
......@@ -45,6 +45,7 @@ func nodataJudge() {
Endpoint: endpoint,
Metric: stra.Exprs[0].Metric,
Tags: "",
TagsMap: map[string]string{},
DsType: "GAUGE",
}
......@@ -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]
......@@ -71,6 +73,7 @@ func nodataJudge() {
Endpoint: data.Endpoint,
Metric: metric,
Tags: tag,
TagsMap: dataobj.DictedTagstring(tag),
DsType: data.DsType,
Step: data.Step,
}
......
......@@ -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();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册