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
52d825f5
Unverified
Commit
52d825f5
authored
Oct 26, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log error on datasource access denied
parent
70ddf936
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
pkg/api/dataproxy.go
+1
-1
pkg/api/metrics.go
+1
-1
No files found.
pkg/api/dataproxy.go
View file @
52d825f5
...
@@ -14,7 +14,7 @@ func (hs *HTTPServer) ProxyDataSourceRequest(c *m.ReqContext) {
...
@@ -14,7 +14,7 @@ func (hs *HTTPServer) ProxyDataSourceRequest(c *m.ReqContext) {
ds
,
err
:=
hs
.
DatasourceCache
.
GetDatasource
(
dsId
,
c
.
SignedInUser
,
c
.
SkipCache
)
ds
,
err
:=
hs
.
DatasourceCache
.
GetDatasource
(
dsId
,
c
.
SignedInUser
,
c
.
SkipCache
)
if
err
!=
nil
{
if
err
!=
nil
{
if
err
==
m
.
ErrDataSourceAccessDenied
{
if
err
==
m
.
ErrDataSourceAccessDenied
{
c
.
JsonApiErr
(
403
,
"Access denied to datasource"
,
nil
)
c
.
JsonApiErr
(
403
,
"Access denied to datasource"
,
err
)
return
return
}
}
c
.
JsonApiErr
(
500
,
"Unable to load datasource meta data"
,
err
)
c
.
JsonApiErr
(
500
,
"Unable to load datasource meta data"
,
err
)
...
...
pkg/api/metrics.go
View file @
52d825f5
...
@@ -28,7 +28,7 @@ func (hs *HTTPServer) QueryMetrics(c *m.ReqContext, reqDto dtos.MetricRequest) R
...
@@ -28,7 +28,7 @@ func (hs *HTTPServer) QueryMetrics(c *m.ReqContext, reqDto dtos.MetricRequest) R
ds
,
err
:=
hs
.
DatasourceCache
.
GetDatasource
(
datasourceId
,
c
.
SignedInUser
,
c
.
SkipCache
)
ds
,
err
:=
hs
.
DatasourceCache
.
GetDatasource
(
datasourceId
,
c
.
SignedInUser
,
c
.
SkipCache
)
if
err
!=
nil
{
if
err
!=
nil
{
if
err
==
m
.
ErrDataSourceAccessDenied
{
if
err
==
m
.
ErrDataSourceAccessDenied
{
return
Error
(
403
,
"Access denied to datasource"
,
nil
)
return
Error
(
403
,
"Access denied to datasource"
,
err
)
}
}
return
Error
(
500
,
"Unable to load datasource meta data"
,
err
)
return
Error
(
500
,
"Unable to load datasource meta data"
,
err
)
}
}
...
...
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