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
12c98608
Commit
12c98608
authored
Aug 28, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
string formating fixes
parent
ff7b0d4f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
14 deletions
+14
-14
pkg/api/live/conn.go
+1
-1
pkg/cmd/grafana-cli/services/services.go
+2
-2
pkg/components/imguploader/s3uploader.go
+1
-1
pkg/log/log.go
+1
-1
pkg/login/ext_user.go
+2
-2
pkg/middleware/auth_proxy.go
+3
-3
pkg/services/alerting/notifiers/telegram.go
+1
-1
pkg/services/sqlstore/sqlstore.go
+1
-1
pkg/services/sqlstore/transactions.go
+1
-1
pkg/setting/setting.go
+1
-1
No files found.
pkg/api/live/conn.go
View file @
12c98608
...
...
@@ -70,7 +70,7 @@ func (c *connection) readPump() {
func
(
c
*
connection
)
handleMessage
(
message
[]
byte
)
{
json
,
err
:=
simplejson
.
NewJson
(
message
)
if
err
!=
nil
{
log
.
Error
(
3
,
"Unreadable message on websocket channel
:
"
,
err
)
log
.
Error
(
3
,
"Unreadable message on websocket channel
. error: %v
"
,
err
)
}
msgType
:=
json
.
Get
(
"action"
)
.
MustString
()
...
...
pkg/cmd/grafana-cli/services/services.go
View file @
12c98608
...
...
@@ -63,7 +63,7 @@ func ListAllPlugins(repoUrl string) (m.PluginRepo, error) {
var
data
m
.
PluginRepo
err
=
json
.
Unmarshal
(
body
,
&
data
)
if
err
!=
nil
{
logger
.
Info
(
"Failed to unmarshal graphite response error:
%v
"
,
err
)
logger
.
Info
(
"Failed to unmarshal graphite response error:"
,
err
)
return
m
.
PluginRepo
{},
err
}
...
...
@@ -140,7 +140,7 @@ func GetPlugin(pluginId, repoUrl string) (m.Plugin, error) {
var
data
m
.
Plugin
err
=
json
.
Unmarshal
(
body
,
&
data
)
if
err
!=
nil
{
logger
.
Info
(
"Failed to unmarshal graphite response error:
%v
"
,
err
)
logger
.
Info
(
"Failed to unmarshal graphite response error:"
,
err
)
return
m
.
Plugin
{},
err
}
...
...
pkg/components/imguploader/s3uploader.go
View file @
12c98608
...
...
@@ -60,7 +60,7 @@ func (u *S3Uploader) Upload(ctx context.Context, imageDiskPath string) (string,
s3_endpoint
,
_
:=
endpoints
.
DefaultResolver
()
.
EndpointFor
(
"s3"
,
u
.
region
)
key
:=
u
.
path
+
util
.
GetRandomString
(
20
)
+
".png"
image_url
:=
s3_endpoint
.
URL
+
"/"
+
u
.
bucket
+
"/"
+
key
log
.
Debug
(
"Uploading image to s3
"
,
"url =
"
,
image_url
)
log
.
Debug
(
"Uploading image to s3
. url = %s
"
,
image_url
)
file
,
err
:=
os
.
Open
(
imageDiskPath
)
if
err
!=
nil
{
...
...
pkg/log/log.go
View file @
12c98608
...
...
@@ -103,7 +103,7 @@ func Critical(skip int, format string, v ...interface{}) {
}
func
Fatal
(
skip
int
,
format
string
,
v
...
interface
{})
{
Root
.
Crit
(
fmt
.
Sprintf
(
format
,
v
))
Root
.
Crit
(
fmt
.
Sprintf
(
format
,
v
...
))
Close
()
os
.
Exit
(
1
)
}
...
...
pkg/login/ext_user.go
View file @
12c98608
...
...
@@ -35,7 +35,7 @@ func UpsertUser(cmd *m.UpsertUserCommand) error {
limitReached
,
err
:=
quota
.
QuotaReached
(
cmd
.
ReqContext
,
"user"
)
if
err
!=
nil
{
log
.
Warn
(
"Error getting user quota
"
,
"err
"
,
err
)
log
.
Warn
(
"Error getting user quota
. error: %v
"
,
err
)
return
ErrGettingUserQuota
}
if
limitReached
{
...
...
@@ -135,7 +135,7 @@ func updateUser(user *m.User, extUser *m.ExternalUserInfo) error {
return
nil
}
log
.
Debug
(
"Syncing user info"
,
"id"
,
user
.
Id
,
"update"
,
updateCmd
)
log
.
Debug
2
(
"Syncing user info"
,
"id"
,
user
.
Id
,
"update"
,
updateCmd
)
return
bus
.
Dispatch
(
updateCmd
)
}
...
...
pkg/middleware/auth_proxy.go
View file @
12c98608
...
...
@@ -36,7 +36,7 @@ func initContextWithAuthProxy(ctx *m.ReqContext, orgID int64) bool {
// initialize session
if
err
:=
ctx
.
Session
.
Start
(
ctx
.
Context
);
err
!=
nil
{
log
.
Error
(
3
,
"Failed to start session"
,
err
)
log
.
Error
(
3
,
"Failed to start session
. error %v
"
,
err
)
return
false
}
...
...
@@ -146,12 +146,12 @@ func initContextWithAuthProxy(ctx *m.ReqContext, orgID int64) bool {
if
getRequestUserId
(
ctx
)
>
0
&&
getRequestUserId
(
ctx
)
!=
query
.
Result
.
UserId
{
// remove session
if
err
:=
ctx
.
Session
.
Destory
(
ctx
.
Context
);
err
!=
nil
{
log
.
Error
(
3
,
"Failed to destroy session
, err"
)
log
.
Error
(
3
,
"Failed to destroy session
. error: %v"
,
err
)
}
// initialize a new session
if
err
:=
ctx
.
Session
.
Start
(
ctx
.
Context
);
err
!=
nil
{
log
.
Error
(
3
,
"Failed to start session"
,
err
)
log
.
Error
(
3
,
"Failed to start session
. error: %v
"
,
err
)
}
}
...
...
pkg/services/alerting/notifiers/telegram.go
View file @
12c98608
...
...
@@ -216,7 +216,7 @@ func appendIfPossible(message string, extra string, sizeLimit int) string {
if
len
(
extra
)
+
len
(
message
)
<=
sizeLimit
{
return
message
+
extra
}
log
.
Debug
(
"Line too long for image caption.
"
,
"value
"
,
extra
)
log
.
Debug
(
"Line too long for image caption.
value: %s
"
,
extra
)
return
message
}
...
...
pkg/services/sqlstore/sqlstore.go
View file @
12c98608
...
...
@@ -106,7 +106,7 @@ func (ss *SqlStore) inTransactionWithRetryCtx(ctx context.Context, callback dbTr
if
len
(
sess
.
events
)
>
0
{
for
_
,
e
:=
range
sess
.
events
{
if
err
=
bus
.
Publish
(
e
);
err
!=
nil
{
log
.
Error
(
3
,
"Failed to publish event after commit"
,
err
)
log
.
Error
(
3
,
"Failed to publish event after commit
. error: %v
"
,
err
)
}
}
}
...
...
pkg/services/sqlstore/transactions.go
View file @
12c98608
...
...
@@ -89,7 +89,7 @@ func inTransactionWithRetryCtx(ctx context.Context, callback dbTransactionFunc,
if
len
(
sess
.
events
)
>
0
{
for
_
,
e
:=
range
sess
.
events
{
if
err
=
bus
.
Publish
(
e
);
err
!=
nil
{
log
.
Error
(
3
,
"Failed to publish event after commit"
,
err
)
log
.
Error
(
3
,
"Failed to publish event after commit
. error: %v
"
,
err
)
}
}
}
...
...
pkg/setting/setting.go
View file @
12c98608
...
...
@@ -324,7 +324,7 @@ func getCommandLineProperties(args []string) map[string]string {
trimmed
:=
strings
.
TrimPrefix
(
arg
,
"cfg:"
)
parts
:=
strings
.
Split
(
trimmed
,
"="
)
if
len
(
parts
)
!=
2
{
log
.
Fatal
(
3
,
"Invalid command line argument"
,
arg
)
log
.
Fatal
(
3
,
"Invalid command line argument
. argument: %v
"
,
arg
)
return
nil
}
...
...
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