Skip to content

Commit

Permalink
Merge pull request #2398 from influxdata/bugfix/hosts-page-error-2255
Browse files Browse the repository at this point in the history
Fix Hosts Page Apps Tag Parsing
  • Loading branch information
cryptoquick committed Nov 28, 2017
2 parents 7da688b + 9d526d5 commit 2fb9196
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
1. [#2327](https://github.com/influxdata/chronograf/pull/2327): Visualize CREATE/DELETE queries with Table view in Data Explorer
1. [#2329](https://github.com/influxdata/chronograf/pull/2329): Include tag values alongside measurement name in Data Explorer result tabs
1. [#2386](https://github.com/influxdata/chronograf/pull/2386): Fix queries that include regex, numbers and wildcard
1. [#2398](https://github.com/influxdata/chronograf/pull/2398): Fix apps on hosts page from parsing tags with null values
1. [#2408](https://github.com/influxdata/chronograf/pull/2408): Fix updated Dashboard names not updating dashboard list

### Features
Expand Down
22 changes: 13 additions & 9 deletions ui/src/hosts/apis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,21 @@ function parseSeries(series) {
function parseTag(s, obj) {
const match = tag.exec(s)

const kv = match[0]
const key = match[1]
const value = match[2]

if (key) {
if (!obj.tags) {
obj.tags = {}
if (match) {
const kv = match[0]
const key = match[1]
const value = match[2]

if (key) {
if (!obj.tags) {
obj.tags = {}
}
obj.tags[key] = value
}
obj.tags[key] = value
return s.slice(match.index + kv.length)
}
return s.slice(match.index + kv.length)

return ''
}

let workStr = series.slice()
Expand Down

0 comments on commit 2fb9196

Please sign in to comment.