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
173e7fd8
Unverified
Commit
173e7fd8
authored
Apr 05, 2019
by
Torkel Ödegaard
Committed by
GitHub
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Graphite query rendering fix (#16390)
Only interpolate string parameters Fixes #16367
parent
c2d399b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
public/app/plugins/datasource/graphite/gfunc.ts
+2
-1
public/app/plugins/datasource/graphite/specs/gfunc.test.ts
+2
-1
No files found.
public/app/plugins/datasource/graphite/gfunc.ts
View file @
173e7fd8
...
...
@@ -966,7 +966,6 @@ export class FuncInstance {
const
str
=
this
.
def
.
name
+
'('
;
const
parameters
=
_
.
map
(
this
.
params
,
(
value
,
index
)
=>
{
const
valueInterpolated
=
replaceVariables
(
value
);
let
paramType
;
if
(
index
<
this
.
def
.
params
.
length
)
{
...
...
@@ -980,6 +979,8 @@ export class FuncInstance {
return
value
;
}
const
valueInterpolated
=
_
.
isString
(
value
)
?
replaceVariables
(
value
)
:
value
;
// param types that might be quoted
// To quote variables correctly we need to interpolate it to check if it contains a numeric or string value
if
(
_
.
includes
([
'int_or_interval'
,
'node_or_tag'
],
paramType
)
&&
_
.
isFinite
(
+
valueInterpolated
))
{
...
...
public/app/plugins/datasource/graphite/specs/gfunc.test.ts
View file @
173e7fd8
...
...
@@ -31,7 +31,8 @@ describe('when creating func instance from func names', () => {
});
function
replaceVariablesDummy
(
str
:
string
)
{
return
str
;
// important that this does replace
return
str
.
replace
(
'asdasdas'
,
'asdsad'
);
}
describe
(
'when rendering func instance'
,
()
=>
{
...
...
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