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
43543d56
Unverified
Commit
43543d56
authored
Jul 24, 2019
by
Torkel Ödegaard
Committed by
GitHub
Jul 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataLinks: Fixed interpolation of series name, fixes #18250 (#18251)
parent
c01bbf20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
public/app/features/panel/panellinks/link_srv.ts
+2
-10
public/app/features/panel/panellinks/specs/link_srv.test.ts
+2
-2
No files found.
public/app/features/panel/panellinks/link_srv.ts
View file @
43543d56
...
...
@@ -91,22 +91,14 @@ export class LinkSrv implements LinkService {
}
getDataPointVars
=
(
seriesName
:
string
,
valueTime
:
DateTime
)
=>
{
// const valueTimeQuery = toUrlParams({
// time: dateTime(valueTime).valueOf(),
// });
const
seriesQuery
=
toUrlParams
({
series
:
seriesName
,
});
return
{
[
DataLinkBuiltInVars
.
valueTime
]:
{
text
:
valueTime
.
valueOf
(),
value
:
valueTime
.
valueOf
(),
},
[
DataLinkBuiltInVars
.
seriesName
]:
{
text
:
series
Query
,
value
:
series
Query
,
text
:
series
Name
,
value
:
series
Name
,
},
};
};
...
...
public/app/features/panel/panellinks/specs/link_srv.test.ts
View file @
43543d56
...
...
@@ -102,12 +102,12 @@ describe('linkSrv', () => {
linkSrv
.
getDataLinkUIModel
(
{
title
:
'Any title'
,
url
:
`/d/1?$
${
DataLinkBuiltInVars
.
seriesName
}
`
,
url
:
`/d/1?
var-test=
$
${
DataLinkBuiltInVars
.
seriesName
}
`
,
},
{},
dataPointMock
).
href
).
toEqual
(
'/d/1?
series
=A-series'
);
).
toEqual
(
'/d/1?
var-test
=A-series'
);
});
it
(
'should interpolate time range based on datapoint timestamp'
,
()
=>
{
expect
(
...
...
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