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
c30947df
Unverified
Commit
c30947df
authored
Nov 13, 2017
by
Carl Bergquist
Committed by
GitHub
Nov 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9855 from mtanda/cw_inspector
(cloudwatch) fix query inspector
parents
6a485f30
ae4bcdd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
public/app/plugins/datasource/cloudwatch/datasource.js
+6
-6
public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts
+5
-9
No files found.
public/app/plugins/datasource/cloudwatch/datasource.js
View file @
c30947df
...
...
@@ -113,7 +113,7 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
};
this
.
performTimeSeriesQuery
=
function
(
request
)
{
return
backendSrv
.
po
st
(
'/api/tsdb/query'
,
request
).
then
(
function
(
res
)
{
return
this
.
awsReque
st
(
'/api/tsdb/query'
,
request
).
then
(
function
(
res
)
{
var
data
=
[];
if
(
res
.
results
)
{
...
...
@@ -139,7 +139,7 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
this
.
doMetricQueryRequest
=
function
(
subtype
,
parameters
)
{
var
range
=
timeSrv
.
timeRange
();
return
backendSrv
.
po
st
(
'/api/tsdb/query'
,
{
return
this
.
awsReque
st
(
'/api/tsdb/query'
,
{
from
:
range
.
from
.
valueOf
().
toString
(),
to
:
range
.
to
.
valueOf
().
toString
(),
queries
:
[
...
...
@@ -277,7 +277,7 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
alarmNamePrefix
:
annotation
.
alarmNamePrefix
||
''
};
return
backendSrv
.
po
st
(
'/api/tsdb/query'
,
{
return
this
.
awsReque
st
(
'/api/tsdb/query'
,
{
from
:
options
.
range
.
from
.
valueOf
().
toString
(),
to
:
options
.
range
.
to
.
valueOf
().
toString
(),
queries
:
[
...
...
@@ -325,15 +325,15 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
});
};
this
.
awsRequest
=
function
(
data
)
{
this
.
awsRequest
=
function
(
url
,
data
)
{
var
options
=
{
method
:
'POST'
,
url
:
this
.
proxyU
rl
,
url
:
u
rl
,
data
:
data
};
return
backendSrv
.
datasourceRequest
(
options
).
then
(
function
(
result
)
{
return
result
.
data
;
return
result
;
});
};
...
...
public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts
View file @
c30947df
...
...
@@ -66,8 +66,8 @@ describe('CloudWatchDatasource', function() {
};
beforeEach
(
function
()
{
ctx
.
backendSrv
.
post
=
function
(
path
,
params
)
{
requestParams
=
params
;
ctx
.
backendSrv
.
datasourceRequest
=
function
(
params
)
{
requestParams
=
params
.
data
;
return
ctx
.
$q
.
when
(
response
);
};
});
...
...
@@ -211,8 +211,8 @@ describe('CloudWatchDatasource', function() {
};
beforeEach
(
function
()
{
ctx
.
backendSrv
.
post
=
function
(
path
,
params
)
{
requestParams
=
params
;
ctx
.
backendSrv
.
datasourceRequest
=
function
(
params
)
{
requestParams
=
params
.
data
;
return
ctx
.
$q
.
when
(
response
);
};
});
...
...
@@ -234,11 +234,7 @@ describe('CloudWatchDatasource', function() {
beforeEach
(()
=>
{
setupCallback
();
ctx
.
backendSrv
.
datasourceRequest
=
args
=>
{
scenario
.
request
=
args
;
return
ctx
.
$q
.
when
({
data
:
scenario
.
requestResponse
});
};
ctx
.
backendSrv
.
post
=
(
path
,
args
)
=>
{
scenario
.
request
=
args
;
scenario
.
request
=
args
.
data
;
return
ctx
.
$q
.
when
(
scenario
.
requestResponse
);
};
ctx
.
ds
.
metricFindQuery
(
query
).
then
(
args
=>
{
...
...
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