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
e2b398a6
Commit
e2b398a6
authored
Jun 17, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:grafana/grafana
parents
fa10fc99
cb2b8dea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
public/app/plugins/datasource/opentsdb/datasource.js
+16
-10
No files found.
public/app/plugins/datasource/opentsdb/datasource.js
View file @
e2b398a6
...
...
@@ -128,13 +128,7 @@ function (angular, _, dateMath) {
data
:
reqBody
};
if
(
this
.
basicAuth
||
this
.
withCredentials
)
{
options
.
withCredentials
=
true
;
}
if
(
this
.
basicAuth
)
{
options
.
headers
=
{
"Authorization"
:
this
.
basicAuth
};
}
this
.
_addCredentialOptions
(
options
);
// In case the backend is 3rd-party hosted and does not suport OPTIONS, urlencoded requests
// go as POST rather than OPTIONS+POST
...
...
@@ -210,11 +204,24 @@ function (angular, _, dateMath) {
};
this
.
_get
=
function
(
relativeUrl
,
params
)
{
return
backendSrv
.
datasourceRequest
(
{
var
options
=
{
method
:
'GET'
,
url
:
this
.
url
+
relativeUrl
,
params
:
params
,
});
};
this
.
_addCredentialOptions
(
options
);
return
backendSrv
.
datasourceRequest
(
options
);
};
this
.
_addCredentialOptions
=
function
(
options
)
{
if
(
this
.
basicAuth
||
this
.
withCredentials
)
{
options
.
withCredentials
=
true
;
}
if
(
this
.
basicAuth
)
{
options
.
headers
=
{
"Authorization"
:
this
.
basicAuth
};
}
};
this
.
metricFindQuery
=
function
(
query
)
{
...
...
@@ -435,7 +442,6 @@ function (angular, _, dateMath) {
date
=
dateMath
.
parse
(
date
,
roundUp
);
return
date
.
valueOf
();
}
}
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