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
c0bf7c5f
Unverified
Commit
c0bf7c5f
authored
Nov 26, 2018
by
Marcus Efraimsson
Committed by
GitHub
Nov 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14140 from grafana/fix_dashboard_service_log
log the actual error if failing to update alert data
parents
46c65947
36aec52c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 additions
and
7 deletions
+1
-7
pkg/api/dashboard.go
+0
-4
pkg/api/dashboard_test.go
+0
-1
pkg/models/dashboards.go
+0
-1
pkg/services/dashboards/dashboard_service.go
+1
-1
No files found.
pkg/api/dashboard.go
View file @
c0bf7c5f
...
...
@@ -277,10 +277,6 @@ func PostDashboard(c *m.ReqContext, cmd m.SaveDashboardCommand) Response {
return
Error
(
500
,
"Failed to save dashboard"
,
err
)
}
if
err
==
m
.
ErrDashboardFailedToUpdateAlertData
{
return
Error
(
500
,
"Invalid alert data. Cannot save dashboard"
,
err
)
}
c
.
TimeRequest
(
metrics
.
M_Api_Dashboard_Save
)
return
JSON
(
200
,
util
.
DynMap
{
"status"
:
"success"
,
...
...
pkg/api/dashboard_test.go
View file @
c0bf7c5f
...
...
@@ -727,7 +727,6 @@ func TestDashboardApiEndpoint(t *testing.T) {
{
SaveError
:
m
.
ErrDashboardTitleEmpty
,
ExpectedStatusCode
:
400
},
{
SaveError
:
m
.
ErrDashboardFolderCannotHaveParent
,
ExpectedStatusCode
:
400
},
{
SaveError
:
alerting
.
ValidationError
{
Reason
:
"Mu"
},
ExpectedStatusCode
:
422
},
{
SaveError
:
m
.
ErrDashboardFailedToUpdateAlertData
,
ExpectedStatusCode
:
500
},
{
SaveError
:
m
.
ErrDashboardFailedGenerateUniqueUid
,
ExpectedStatusCode
:
500
},
{
SaveError
:
m
.
ErrDashboardTypeMismatch
,
ExpectedStatusCode
:
400
},
{
SaveError
:
m
.
ErrDashboardFolderWithSameNameAsDashboard
,
ExpectedStatusCode
:
400
},
...
...
pkg/models/dashboards.go
View file @
c0bf7c5f
...
...
@@ -21,7 +21,6 @@ var (
ErrDashboardVersionMismatch
=
errors
.
New
(
"The dashboard has been changed by someone else"
)
ErrDashboardTitleEmpty
=
errors
.
New
(
"Dashboard title cannot be empty"
)
ErrDashboardFolderCannotHaveParent
=
errors
.
New
(
"A Dashboard Folder cannot be added to another folder"
)
ErrDashboardFailedToUpdateAlertData
=
errors
.
New
(
"Failed to save alert data"
)
ErrDashboardsWithSameSlugExists
=
errors
.
New
(
"Multiple dashboards with the same slug exists"
)
ErrDashboardFailedGenerateUniqueUid
=
errors
.
New
(
"Failed to generate unique dashboard id"
)
ErrDashboardTypeMismatch
=
errors
.
New
(
"Dashboard cannot be changed to a folder"
)
...
...
pkg/services/dashboards/dashboard_service.go
View file @
c0bf7c5f
...
...
@@ -165,7 +165,7 @@ func (dr *dashboardServiceImpl) updateAlerting(cmd *models.SaveDashboardCommand,
}
if
err
:=
bus
.
Dispatch
(
&
alertCmd
);
err
!=
nil
{
return
models
.
ErrDashboardFailedToUpdateAlertData
return
err
}
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