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
98082a94
Commit
98082a94
authored
Jan 30, 2016
by
Pablo Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow the use of auth and credentials in opentsdb
parent
29185eee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
public/app/plugins/datasource/opentsdb/datasource.js
+11
-0
No files found.
public/app/plugins/datasource/opentsdb/datasource.js
View file @
98082a94
...
...
@@ -13,6 +13,8 @@ function (angular, _, dateMath) {
this
.
type
=
'opentsdb'
;
this
.
url
=
instanceSettings
.
url
;
this
.
name
=
instanceSettings
.
name
;
this
.
withCredentials
=
instanceSettings
.
withCredentials
;
this
.
basicAuth
=
instanceSettings
.
basicAuth
;
this
.
supportMetrics
=
true
;
// Called once per panel (graph)
...
...
@@ -71,6 +73,15 @@ function (angular, _, dateMath) {
url
:
this
.
url
+
'/api/query'
,
data
:
reqBody
};
if
(
this
.
basicAuth
||
this
.
withCredentials
)
{
options
.
withCredentials
=
true
;
}
if
(
this
.
basicAuth
)
{
options
.
headers
=
{
"Authorization"
:
this
.
basicAuth
};
}
// In case the backend is 3rd-party hosted and does not suport OPTIONS, urlencoded requests
// go as POST rather than OPTIONS+POST
...
...
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