Merge pull request #459 from influxdata/regex-magic

Fix regex bug
pull/463/head
Chris Goller 2016-11-10 16:19:50 -06:00 committed by GitHub
commit 8a88733549
2 changed files with 14 additions and 16 deletions

View File

@ -1,23 +1,21 @@
{
"id": "793e6cca-7d7f-48e4-8db2-7b81761cc6ff",
"measurement": "redis_keyspace",
"app": "redis",
"cells": [
{
{
"id": "793e6cca-7d7f-48e4-8db2-7b81761cc6ff",
"measurement": "redis",
"app": "redis",
"cells": [{
"x": 0,
"y": 0,
"w": 4,
"h": 4,
"i": "9c168ac8-2985-4883-bdf2-938ea9f065b9",
"name": "Redis - Connected Clients",
"queries": [
{
"query": "select clients from redis",
"db": "telegraf",
"rp": "autogen",
"groupbys": []
}
]
"queries": [{
"query": "select clients from redis",
"db": "telegraf",
"rp": "autogen",
"groupbys": []
}]
},
{
"x": 0,
@ -67,5 +65,5 @@
}
]
}
]
}
]
}

View File

@ -62,7 +62,7 @@ export function getAppsForHosts(proxyLink, hosts, appMappings) {
const newHosts = Object.assign({}, hosts);
const allSeries = _.get(resp, ['data', 'results', '0', 'series', '0', 'values'], []);
allSeries.forEach(([series]) => {
const matches = series.match(/(\w*),.*,host=([^,]*)/);
const matches = series.match(/(\w*).*,host=([^,]*)/);
if (!matches || matches.length !== 3) { // eslint-disable-line no-magic-numbers
return;
}