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
df33cbc8
Commit
df33cbc8
authored
Jun 30, 2015
by
Donn Pebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong metrics counter
parent
a38a06a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
pkg/api/common.go
+2
-2
pkg/middleware/middleware.go
+2
-2
No files found.
pkg/api/common.go
View file @
df33cbc8
...
@@ -87,10 +87,10 @@ func ApiError(status int, message string, err error) *NormalResponse {
...
@@ -87,10 +87,10 @@ func ApiError(status int, message string, err error) *NormalResponse {
switch
status
{
switch
status
{
case
404
:
case
404
:
metrics
.
M_Api_Status_404
.
Inc
(
1
)
resp
[
"message"
]
=
"Not Found"
resp
[
"message"
]
=
"Not Found"
metrics
.
M_Api_Status_500
.
Inc
(
1
)
case
500
:
case
500
:
metrics
.
M_Api_Status_
404
.
Inc
(
1
)
metrics
.
M_Api_Status_
500
.
Inc
(
1
)
resp
[
"message"
]
=
"Internal Server Error"
resp
[
"message"
]
=
"Internal Server Error"
}
}
...
...
pkg/middleware/middleware.go
View file @
df33cbc8
...
@@ -197,10 +197,10 @@ func (ctx *Context) JsonApiErr(status int, message string, err error) {
...
@@ -197,10 +197,10 @@ func (ctx *Context) JsonApiErr(status int, message string, err error) {
switch
status
{
switch
status
{
case
404
:
case
404
:
metrics
.
M_Api_Status_404
.
Inc
(
1
)
resp
[
"message"
]
=
"Not Found"
resp
[
"message"
]
=
"Not Found"
metrics
.
M_Api_Status_500
.
Inc
(
1
)
case
500
:
case
500
:
metrics
.
M_Api_Status_
404
.
Inc
(
1
)
metrics
.
M_Api_Status_
500
.
Inc
(
1
)
resp
[
"message"
]
=
"Internal Server Error"
resp
[
"message"
]
=
"Internal Server Error"
}
}
...
...
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