deduplicate tag value suggestions for OpenTSDB

This commit is contained in:
Liu Yubao 2015-09-17 01:25:28 +08:00
parent 1f959272c5
commit 62ae80eeae

View File

@ -97,7 +97,9 @@ function (angular, _, kbn) {
result = result.data.results;
var tagvs = [];
_.each(result, function(r) {
tagvs.push(r.tags[key]);
if (tagvs.indexOf(r.tags[key]) === -1) {
tagvs.push(r.tags[key]);
}
});
return tagvs;
});