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
e93fba20
Commit
e93fba20
authored
Aug 31, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(kariosdb): fixed how kairosdb makes datasource requests, fixes #2628
parent
3dfa2857
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
public/app/plugins/datasource/kairosdb/datasource.js
+6
-10
No files found.
public/app/plugins/datasource/kairosdb/datasource.js
View file @
e93fba20
...
...
@@ -10,7 +10,7 @@ function (angular, _, kbn) {
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
factory
(
'KairosDBDatasource'
,
function
(
$q
,
$http
,
templateSrv
)
{
module
.
factory
(
'KairosDBDatasource'
,
function
(
$q
,
backendSrv
,
templateSrv
)
{
function
KairosDBDatasource
(
datasource
)
{
this
.
type
=
datasource
.
type
;
...
...
@@ -51,10 +51,6 @@ function (angular, _, kbn) {
return
this
.
performTimeSeriesQuery
(
queries
,
start
,
end
).
then
(
handleKairosDBQueryResponseAlias
,
handleQueryError
);
};
///////////////////////////////////////////////////////////////////////
/// Query methods
///////////////////////////////////////////////////////////////////////
KairosDBDatasource
.
prototype
.
performTimeSeriesQuery
=
function
(
queries
,
start
,
end
)
{
var
reqBody
=
{
metrics
:
queries
,
...
...
@@ -70,7 +66,7 @@ function (angular, _, kbn) {
data
:
reqBody
};
return
$http
(
options
);
return
backendSrv
.
datasourceRequest
(
options
);
};
/**
...
...
@@ -83,7 +79,7 @@ function (angular, _, kbn) {
method
:
'GET'
};
return
$http
(
options
).
then
(
function
(
response
)
{
return
backendSrv
.
datasourceRequest
(
options
).
then
(
function
(
response
)
{
if
(
!
response
.
data
)
{
return
$q
.
when
([]);
}
...
...
@@ -110,7 +106,7 @@ function (angular, _, kbn) {
}
};
return
$http
(
options
).
then
(
function
(
result
)
{
return
backendSrv
.
datasourceRequest
(
options
).
then
(
function
(
result
)
{
if
(
!
result
.
data
)
{
return
$q
.
when
([]);
}
...
...
@@ -139,7 +135,7 @@ function (angular, _, kbn) {
}
};
return
$http
(
options
).
then
(
function
(
result
)
{
return
backendSrv
.
datasourceRequest
(
options
).
then
(
function
(
result
)
{
if
(
!
result
.
data
)
{
return
$q
.
when
([]);
}
...
...
@@ -158,7 +154,7 @@ function (angular, _, kbn) {
}
};
return
$http
(
options
).
then
(
function
(
response
)
{
return
backendSrv
.
datasourceRequest
(
options
).
then
(
function
(
response
)
{
if
(
!
response
.
data
)
{
return
[];
}
...
...
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