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
38d8ba8f
Commit
38d8ba8f
authored
Dec 14, 2016
by
Carl Bergquist
Committed by
GitHub
Dec 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6952 from huydx/format-gofmt
(format) run go fmt in pkg
parents
9cd04768
adb441e5
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
18 additions
and
19 deletions
+18
-19
pkg/api/login_oauth.go
+2
-2
pkg/bus/bus.go
+0
-0
pkg/middleware/session.go
+0
-0
pkg/services/sqlstore/migrator/mysql_dialect.go
+0
-0
pkg/services/sqlstore/sqlstore.go
+0
-1
pkg/social/generic_oauth.go
+3
-3
pkg/social/github_oauth.go
+0
-0
pkg/social/google_oauth.go
+0
-0
pkg/social/grafananet_oauth.go
+0
-0
pkg/social/social.go
+0
-0
pkg/tsdb/opentsdb/opentsdb_test.go
+13
-13
pkg/tsdb/opentsdb/types.go
+0
-0
No files found.
pkg/api/login_oauth.go
View file @
38d8ba8f
...
...
@@ -55,8 +55,8 @@ func OAuthLogin(ctx *middleware.Context) {
ctx
.
Session
.
Set
(
middleware
.
SESS_KEY_OAUTH_STATE
,
state
)
if
setting
.
OAuthService
.
OAuthInfos
[
name
]
.
HostedDomain
==
""
{
ctx
.
Redirect
(
connect
.
AuthCodeURL
(
state
,
oauth2
.
AccessTypeOnline
))
}
else
{
ctx
.
Redirect
(
connect
.
AuthCodeURL
(
state
,
oauth2
.
SetParam
(
"hd"
,
setting
.
OAuthService
.
OAuthInfos
[
name
]
.
HostedDomain
),
oauth2
.
AccessTypeOnline
))
;
}
else
{
ctx
.
Redirect
(
connect
.
AuthCodeURL
(
state
,
oauth2
.
SetParam
(
"hd"
,
setting
.
OAuthService
.
OAuthInfos
[
name
]
.
HostedDomain
),
oauth2
.
AccessTypeOnline
))
}
return
}
...
...
pkg/bus/bus.go
View file @
38d8ba8f
pkg/middleware/session.go
View file @
38d8ba8f
pkg/services/sqlstore/migrator/mysql_dialect.go
View file @
38d8ba8f
pkg/services/sqlstore/sqlstore.go
View file @
38d8ba8f
...
...
@@ -23,7 +23,6 @@ import (
_
"github.com/mattn/go-sqlite3"
)
type
DatabaseConfig
struct
{
Type
,
Host
,
Name
,
User
,
Pwd
,
Path
,
SslMode
string
CaCertPath
string
...
...
pkg/social/generic_oauth.go
View file @
38d8ba8f
...
...
@@ -186,7 +186,7 @@ func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
Email
:
data
.
Email
,
}
if
(
userInfo
.
Email
==
""
&&
data
.
Attributes
[
"email:primary"
]
!=
nil
)
{
if
userInfo
.
Email
==
""
&&
data
.
Attributes
[
"email:primary"
]
!=
nil
{
userInfo
.
Email
=
data
.
Attributes
[
"email:primary"
][
0
]
}
...
...
@@ -197,11 +197,11 @@ func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
}
}
if
(
userInfo
.
Login
==
""
&&
data
.
Username
!=
""
)
{
if
userInfo
.
Login
==
""
&&
data
.
Username
!=
""
{
userInfo
.
Login
=
data
.
Username
}
if
(
userInfo
.
Login
==
""
)
{
if
userInfo
.
Login
==
""
{
userInfo
.
Login
=
data
.
Email
}
...
...
pkg/social/github_oauth.go
View file @
38d8ba8f
pkg/social/google_oauth.go
View file @
38d8ba8f
pkg/social/grafananet_oauth.go
View file @
38d8ba8f
pkg/social/social.go
View file @
38d8ba8f
pkg/tsdb/opentsdb/opentsdb_test.go
View file @
38d8ba8f
...
...
@@ -3,9 +3,9 @@ package opentsdb
import
(
"testing"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/tsdb"
.
"github.com/smartystreets/goconvey/convey"
"github.com/grafana/grafana/pkg/components/simplejson"
)
func
TestOpenTsdbExecutor
(
t
*
testing
.
T
)
{
...
...
@@ -23,8 +23,8 @@ func TestOpenTsdbExecutor(t *testing.T) {
query
.
Model
.
Set
(
"aggregator"
,
"avg"
)
query
.
Model
.
Set
(
"disableDownsampling"
,
false
)
query
.
Model
.
Set
(
"downsampleInterval"
,
""
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"avg"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"none"
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"avg"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"none"
)
metric
:=
exec
.
buildMetric
(
query
)
...
...
@@ -45,8 +45,8 @@ func TestOpenTsdbExecutor(t *testing.T) {
query
.
Model
.
Set
(
"aggregator"
,
"avg"
)
query
.
Model
.
Set
(
"disableDownsampling"
,
true
)
query
.
Model
.
Set
(
"downsampleInterval"
,
""
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"avg"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"none"
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"avg"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"none"
)
metric
:=
exec
.
buildMetric
(
query
)
...
...
@@ -66,8 +66,8 @@ func TestOpenTsdbExecutor(t *testing.T) {
query
.
Model
.
Set
(
"aggregator"
,
"avg"
)
query
.
Model
.
Set
(
"disableDownsampling"
,
false
)
query
.
Model
.
Set
(
"downsampleInterval"
,
"5m"
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"sum"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"null"
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"sum"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"null"
)
metric
:=
exec
.
buildMetric
(
query
)
...
...
@@ -87,8 +87,8 @@ func TestOpenTsdbExecutor(t *testing.T) {
query
.
Model
.
Set
(
"aggregator"
,
"avg"
)
query
.
Model
.
Set
(
"disableDownsampling"
,
true
)
query
.
Model
.
Set
(
"downsampleInterval"
,
"5m"
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"sum"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"null"
)
query
.
Model
.
Set
(
"downsampleAggregator"
,
"sum"
)
query
.
Model
.
Set
(
"downsampleFillPolicy"
,
"null"
)
tags
:=
simplejson
.
New
()
tags
.
Set
(
"env"
,
"prod"
)
...
...
@@ -117,7 +117,7 @@ func TestOpenTsdbExecutor(t *testing.T) {
query
.
Model
.
Set
(
"aggregator"
,
"avg"
)
query
.
Model
.
Set
(
"disableDownsampling"
,
true
)
query
.
Model
.
Set
(
"shouldComputeRate"
,
true
)
query
.
Model
.
Set
(
"isCounter"
,
false
)
query
.
Model
.
Set
(
"isCounter"
,
false
)
tags
:=
simplejson
.
New
()
tags
.
Set
(
"env"
,
"prod"
)
...
...
@@ -147,9 +147,9 @@ func TestOpenTsdbExecutor(t *testing.T) {
query
.
Model
.
Set
(
"aggregator"
,
"avg"
)
query
.
Model
.
Set
(
"disableDownsampling"
,
true
)
query
.
Model
.
Set
(
"shouldComputeRate"
,
true
)
query
.
Model
.
Set
(
"isCounter"
,
true
)
query
.
Model
.
Set
(
"counterMax"
,
45
)
query
.
Model
.
Set
(
"counterResetValue"
,
60
)
query
.
Model
.
Set
(
"isCounter"
,
true
)
query
.
Model
.
Set
(
"counterMax"
,
45
)
query
.
Model
.
Set
(
"counterResetValue"
,
60
)
tags
:=
simplejson
.
New
()
tags
.
Set
(
"env"
,
"prod"
)
...
...
pkg/tsdb/opentsdb/types.go
View file @
38d8ba8f
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