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
b02a8127
Commit
b02a8127
authored
Oct 11, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackdriver: remove debug comments
parent
a56c5841
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
8 deletions
+0
-8
pkg/api/pluginproxy/ds_auth_provider.go
+0
-3
pkg/tsdb/stackdriver/stackdriver.go
+0
-3
pkg/tsdb/stackdriver/test_datasource_query.go
+0
-2
No files found.
pkg/api/pluginproxy/ds_auth_provider.go
View file @
b02a8127
...
...
@@ -55,10 +55,8 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route
}
}
logger
.
Info
(
"ds-auth-provider-authenticationType"
,
"debug"
,
ds
.
JsonData
.
Get
(
"authenticationType"
))
authenticationType
:=
ds
.
JsonData
.
Get
(
"authenticationType"
)
.
MustString
(
"jwt"
)
if
route
.
JwtTokenAuth
!=
nil
&&
authenticationType
==
"jwt"
{
logger
.
Info
(
"authenticationType"
,
"authenticationType"
,
"jwt"
)
if
token
,
err
:=
tokenProvider
.
getJwtAccessToken
(
ctx
,
data
);
err
!=
nil
{
logger
.
Error
(
"Failed to get access token"
,
"error"
,
err
)
}
else
{
...
...
@@ -67,7 +65,6 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route
}
if
authenticationType
==
"gce"
{
logger
.
Info
(
"authenticationType"
,
"authenticationType"
,
"gce"
)
tokenSrc
,
err
:=
google
.
DefaultTokenSource
(
ctx
,
route
.
JwtTokenAuth
.
Scopes
...
)
if
err
!=
nil
{
logger
.
Error
(
"Failed to get default token from meta data server"
,
"error"
,
err
)
...
...
pkg/tsdb/stackdriver/stackdriver.go
View file @
b02a8127
...
...
@@ -19,7 +19,6 @@ import (
"golang.org/x/oauth2/google"
"github.com/grafana/grafana/pkg/api/pluginproxy"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/components/null"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/log"
...
...
@@ -96,7 +95,6 @@ func (e *StackdriverExecutor) executeTimeSeriesQuery(ctx context.Context, tsdbQu
Results
:
make
(
map
[
string
]
*
tsdb
.
QueryResult
),
}
logger
.
Info
(
"executeTimeSeriesQuery-authenticationType"
,
"debug"
,
e
.
dsInfo
.
JsonData
.
Get
(
"authenticationType"
))
authenticationType
:=
e
.
dsInfo
.
JsonData
.
Get
(
"authenticationType"
)
.
MustString
(
jwtAuthentication
)
if
authenticationType
==
gceAuthentication
{
defaultProject
,
err
:=
e
.
getDefaultProject
(
ctx
)
...
...
@@ -596,7 +594,6 @@ func (e *StackdriverExecutor) getDefaultProject(ctx context.Context) (string, er
if
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"Failed to retrieve default project from GCE metadata server. error: %v"
,
err
)
}
else
{
logger
.
Info
(
"projectName"
,
"projectName"
,
defaultCredentials
.
ProjectID
)
return
defaultCredentials
.
ProjectID
,
nil
}
}
else
{
...
...
pkg/tsdb/stackdriver/test_datasource_query.go
View file @
b02a8127
...
...
@@ -8,7 +8,6 @@ import (
"net/http"
"strings"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/components/simplejson"
"golang.org/x/net/context/ctxhttp"
...
...
@@ -21,7 +20,6 @@ func (e *StackdriverExecutor) executeTestDataSource(ctx context.Context, tsdbQue
Results
:
make
(
map
[
string
]
*
tsdb
.
QueryResult
),
}
logger
.
Info
(
"executeTestDataSource-authenticationType"
,
"debug"
,
e
.
dsInfo
.
JsonData
.
Get
(
"authenticationType"
))
authenticationType
:=
e
.
dsInfo
.
JsonData
.
Get
(
"authenticationType"
)
.
MustString
(
jwtAuthentication
)
if
authenticationType
==
gceAuthentication
{
defaultProject
,
err
:=
e
.
getDefaultProject
(
ctx
)
...
...
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