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
38126bc5
Commit
38126bc5
authored
Feb 20, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(templating): fixed issue detecting template variable dependency, fixes #7354
parent
492b2bd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGELOG.md
+1
-0
public/app/features/templating/specs/variable_specs.ts
+6
-1
public/app/features/templating/variable.ts
+1
-1
No files found.
CHANGELOG.md
View file @
38126bc5
...
...
@@ -43,6 +43,7 @@
*
**OAuth**
: Redirect to original page when logging in with OAuth
[
#7513
](
https://github.com/grafana/grafana/issues/7513
)
*
**Annotations**
: Wrap text in annotations tooltip
[
#7542
](
https://github.com/grafana/grafana/pull/7542
)
, thx
[
@xginn8
](
https://github.com/xginn8
)
*
**Templating**
: Fixes error when using numeric sort on empty strings
[
#7382
](
https://github.com/grafana/grafana/issues/7382
)
*
**Templating**
: Fixed issue detecting template variable dependency
[
#7354
](
https://github.com/grafana/grafana/issues/7354
)
# 4.1.2 (2017-02-13)
...
...
public/app/features/templating/specs/variable_specs.ts
View file @
38126bc5
...
...
@@ -12,10 +12,15 @@ describe('containsVariable', function() {
});
it
(
'should not find it if only part matches with $var syntax'
,
function
()
{
var
contains
=
containsVariable
(
'this.$
ServerDomain.filters'
,
'S
erver'
);
var
contains
=
containsVariable
(
'this.$
serverDomain.filters'
,
's
erver'
);
expect
(
contains
).
to
.
be
(
false
);
});
it
(
'should find it if it ends with variable and passing multiple test strings'
,
function
()
{
var
contains
=
containsVariable
(
'show field keys from $pgmetric'
,
'test string2'
,
'pgmetric'
);
expect
(
contains
).
to
.
be
(
true
);
});
it
(
'should find it with [[var]] syntax'
,
function
()
{
var
contains
=
containsVariable
(
'this.[[test]].filters'
,
'test'
);
expect
(
contains
).
to
.
be
(
true
);
...
...
public/app/features/templating/variable.ts
View file @
38126bc5
...
...
@@ -23,7 +23,7 @@ export function containsVariable(...args: any[]) {
var
str
=
args
[
0
]
||
''
;
for
(
var
i
=
1
;
i
<
args
.
length
-
1
;
i
++
)
{
str
+=
args
[
i
]
||
''
;
str
+=
' '
+
args
[
i
]
||
''
;
}
variableName
=
kbn
.
regexEscape
(
variableName
);
...
...
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