Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
7cae087e
Commit
7cae087e
authored
Jul 31, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(influxdb_09): fixed handling of regex measurement in explore queries, fixes #2415
parent
4c7e5228
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
public/app/plugins/datasource/influxdb/queryBuilder.js
+4
-1
public/test/specs/influx09-querybuilder-specs.js
+6
-0
No files found.
public/app/plugins/datasource/influxdb/queryBuilder.js
View file @
7cae087e
...
@@ -44,7 +44,10 @@ function (_) {
...
@@ -44,7 +44,10 @@ function (_) {
}
}
if
(
measurement
)
{
if
(
measurement
)
{
query
+=
' FROM "'
+
measurement
+
'"'
;
if
(
!
measurement
.
match
(
'^/.*/'
)
&&
!
measurement
.
match
(
/^merge
\(
.*
\)
/
))
{
measurement
=
'"'
+
measurement
+
'"'
;
}
query
+=
' FROM '
+
measurement
;
}
}
if
(
withKey
)
{
if
(
withKey
)
{
...
...
public/test/specs/influx09-querybuilder-specs.js
View file @
7cae087e
...
@@ -102,6 +102,12 @@ define([
...
@@ -102,6 +102,12 @@ define([
expect
(
query
).
to
.
be
(
'SHOW TAG KEYS FROM "cpu"'
);
expect
(
query
).
to
.
be
(
'SHOW TAG KEYS FROM "cpu"'
);
});
});
it
(
'should handle regex measurement in tag keys query'
,
function
()
{
var
builder
=
new
InfluxQueryBuilder
({
measurement
:
'/.*/'
,
tags
:
[]
});
var
query
=
builder
.
buildExploreQuery
(
'TAG_KEYS'
);
expect
(
query
).
to
.
be
(
'SHOW TAG KEYS FROM /.*/'
);
});
it
(
'should have no conditions in tags keys query given query with no measurement or tag'
,
function
()
{
it
(
'should have no conditions in tags keys query given query with no measurement or tag'
,
function
()
{
var
builder
=
new
InfluxQueryBuilder
({
measurement
:
''
,
tags
:
[]
});
var
builder
=
new
InfluxQueryBuilder
({
measurement
:
''
,
tags
:
[]
});
var
query
=
builder
.
buildExploreQuery
(
'TAG_KEYS'
);
var
query
=
builder
.
buildExploreQuery
(
'TAG_KEYS'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment