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
a8f57b2f
Unverified
Commit
a8f57b2f
authored
Aug 12, 2020
by
kay delaney
Committed by
GitHub
Aug 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Datasource/CloudWatchLogs: Correctly interpolate variables for data links (#26929)
Closes #26792
parent
751a07e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
public/app/plugins/datasource/cloudwatch/datasource.ts
+9
-5
No files found.
public/app/plugins/datasource/cloudwatch/datasource.ts
View file @
a8f57b2f
...
...
@@ -301,14 +301,18 @@ export class CloudWatchDatasource extends DataSourceApi<CloudWatchQuery, CloudWa
const
end
=
range
.
to
.
toISOString
();
const
curTarget
=
options
.
targets
.
find
(
target
=>
target
.
refId
===
dataFrame
.
refId
)
as
CloudWatchLogsQuery
;
const
interpolatedGroups
=
curTarget
.
logGroupNames
?.
map
((
logGroup
:
string
)
=>
this
.
replace
(
logGroup
,
options
.
scopedVars
,
true
,
'log groups'
)
)
??
[];
const
urlProps
:
AwsUrl
=
{
end
,
start
,
timeType
:
'ABSOLUTE'
,
tz
:
'UTC'
,
editorString
:
curTarget
.
expression
?
?
''
,
editorString
:
curTarget
.
expression
?
this
.
replace
(
curTarget
.
expression
,
options
.
scopedVars
,
true
)
:
''
,
isLiveTail
:
false
,
source
:
curTarget
.
logGroupNames
??
[]
,
source
:
interpolatedGroups
,
};
const
encodedUrl
=
encodeUrl
(
...
...
@@ -830,9 +834,9 @@ export class CloudWatchDatasource extends DataSourceApi<CloudWatchQuery, CloudWa
this
.
templateSrv
.
variableExists
(
target
.
region
)
||
this
.
templateSrv
.
variableExists
(
target
.
namespace
)
||
this
.
templateSrv
.
variableExists
(
target
.
metricName
)
||
_
.
find
(
target
.
dimensions
,
(
v
,
k
)
=>
{
return
this
.
templateSrv
.
variableExists
(
k
)
||
this
.
templateSrv
.
variableExists
(
v
);
}
)
this
.
templateSrv
.
variableExists
(
target
.
expression
!
)
||
target
.
logGroupNames
?.
some
((
logGroup
:
string
)
=>
this
.
templateSrv
.
variableExists
(
logGroup
))
||
_
.
find
(
target
.
dimensions
,
(
v
,
k
)
=>
this
.
templateSrv
.
variableExists
(
k
)
||
this
.
templateSrv
.
variableExists
(
v
)
)
);
}
...
...
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