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
663a56cb
Unverified
Commit
663a56cb
authored
Sep 21, 2018
by
Torkel Ödegaard
Committed by
GitHub
Sep 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13374 from mjtrangoni/fix-megacheck-issues
Fix megacheck issues
parents
a6c438c8
03a2a39a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
14 deletions
+6
-14
pkg/services/sqlstore/user.go
+0
-3
pkg/tracing/tracing.go
+2
-1
pkg/tsdb/elasticsearch/client/search_request.go
+2
-6
pkg/tsdb/elasticsearch/response_parser.go
+2
-4
No files found.
pkg/services/sqlstore/user.go
View file @
663a56cb
...
...
@@ -271,9 +271,6 @@ func ChangeUserPassword(cmd *m.ChangeUserPasswordCommand) error {
func
UpdateUserLastSeenAt
(
cmd
*
m
.
UpdateUserLastSeenAtCommand
)
error
{
return
inTransaction
(
func
(
sess
*
DBSession
)
error
{
if
cmd
.
UserId
<=
0
{
}
user
:=
m
.
User
{
Id
:
cmd
.
UserId
,
LastSeenAt
:
time
.
Now
(),
...
...
pkg/tracing/tracing.go
View file @
663a56cb
...
...
@@ -58,6 +58,7 @@ func (ts *TracingService) parseSettings() {
func
(
ts
*
TracingService
)
initGlobalTracer
()
error
{
cfg
:=
jaegercfg
.
Configuration
{
ServiceName
:
"grafana"
,
Disabled
:
!
ts
.
enabled
,
Sampler
:
&
jaegercfg
.
SamplerConfig
{
Type
:
ts
.
samplerType
,
...
...
@@ -78,7 +79,7 @@ func (ts *TracingService) initGlobalTracer() error {
options
=
append
(
options
,
jaegercfg
.
Tag
(
tag
,
value
))
}
tracer
,
closer
,
err
:=
cfg
.
New
(
"grafana"
,
options
...
)
tracer
,
closer
,
err
:=
cfg
.
New
Tracer
(
options
...
)
if
err
!=
nil
{
return
err
}
...
...
pkg/tsdb/elasticsearch/client/search_request.go
View file @
663a56cb
...
...
@@ -56,9 +56,7 @@ func (b *SearchRequestBuilder) Build() (*SearchRequest, error) {
if
err
!=
nil
{
return
nil
,
err
}
for
_
,
agg
:=
range
aggArray
{
sr
.
Aggs
=
append
(
sr
.
Aggs
,
agg
)
}
sr
.
Aggs
=
append
(
sr
.
Aggs
,
aggArray
...
)
}
}
...
...
@@ -300,9 +298,7 @@ func (b *aggBuilderImpl) Build() (AggArray, error) {
return
nil
,
err
}
for
_
,
childAgg
:=
range
childAggs
{
agg
.
Aggregation
.
Aggs
=
append
(
agg
.
Aggregation
.
Aggs
,
childAgg
)
}
agg
.
Aggregation
.
Aggs
=
append
(
agg
.
Aggregation
.
Aggs
,
childAggs
...
)
}
aggs
=
append
(
aggs
,
agg
)
...
...
pkg/tsdb/elasticsearch/response_parser.go
View file @
663a56cb
...
...
@@ -92,7 +92,7 @@ func (rp *responseParser) processBuckets(aggs map[string]interface{}, target *Qu
}
else
{
for
_
,
b
:=
range
esAgg
.
Get
(
"buckets"
)
.
MustArray
()
{
bucket
:=
simplejson
.
NewFromAny
(
b
)
newProps
:=
make
(
map
[
string
]
string
,
0
)
newProps
:=
make
(
map
[
string
]
string
)
for
k
,
v
:=
range
props
{
newProps
[
k
]
=
v
...
...
@@ -122,7 +122,7 @@ func (rp *responseParser) processBuckets(aggs map[string]interface{}, target *Qu
for
_
,
bucketKey
:=
range
bucketKeys
{
bucket
:=
simplejson
.
NewFromAny
(
buckets
[
bucketKey
])
newProps
:=
make
(
map
[
string
]
string
,
0
)
newProps
:=
make
(
map
[
string
]
string
)
for
k
,
v
:=
range
props
{
newProps
[
k
]
=
v
...
...
@@ -314,7 +314,6 @@ func (rp *responseParser) processAggregationDocs(esAgg *simplejson.Json, aggDef
switch
metric
.
Type
{
case
"count"
:
addMetricValue
(
&
values
,
rp
.
getMetricName
(
metric
.
Type
),
castToNullFloat
(
bucket
.
Get
(
"doc_count"
)))
break
case
"extended_stats"
:
metaKeys
:=
make
([]
string
,
0
)
meta
:=
metric
.
Meta
.
MustMap
()
...
...
@@ -355,7 +354,6 @@ func (rp *responseParser) processAggregationDocs(esAgg *simplejson.Json, aggDef
}
addMetricValue
(
&
values
,
metricName
,
castToNullFloat
(
bucket
.
GetPath
(
metric
.
ID
,
"value"
)))
break
}
}
...
...
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