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
d670f1b9
Commit
d670f1b9
authored
Nov 07, 2016
by
Carl Bergquist
Committed by
GitHub
Nov 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6479 from utkarshcmu/playlist_bug
Removed playlist item when dashboard is deleted
parents
b8879113
c737704e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
pkg/api/playlist.go
+12
-0
pkg/services/sqlstore/dashboard.go
+1
-0
No files found.
pkg/api/playlist.go
View file @
d670f1b9
...
@@ -26,6 +26,18 @@ func ValidateOrgPlaylist(c *middleware.Context) {
...
@@ -26,6 +26,18 @@ func ValidateOrgPlaylist(c *middleware.Context) {
c
.
JsonApiErr
(
403
,
"You are not allowed to edit/view playlist"
,
nil
)
c
.
JsonApiErr
(
403
,
"You are not allowed to edit/view playlist"
,
nil
)
return
return
}
}
items
,
itemsErr
:=
LoadPlaylistItemDTOs
(
id
)
if
itemsErr
!=
nil
{
c
.
JsonApiErr
(
404
,
"Playlist items not found"
,
err
)
return
}
if
len
(
items
)
==
0
{
c
.
JsonApiErr
(
404
,
"Playlist is empty"
,
itemsErr
)
return
}
}
}
func
SearchPlaylists
(
c
*
middleware
.
Context
)
Response
{
func
SearchPlaylists
(
c
*
middleware
.
Context
)
Response
{
...
...
pkg/services/sqlstore/dashboard.go
View file @
d670f1b9
...
@@ -233,6 +233,7 @@ func DeleteDashboard(cmd *m.DeleteDashboardCommand) error {
...
@@ -233,6 +233,7 @@ func DeleteDashboard(cmd *m.DeleteDashboardCommand) error {
"DELETE FROM dashboard_tag WHERE dashboard_id = ? "
,
"DELETE FROM dashboard_tag WHERE dashboard_id = ? "
,
"DELETE FROM star WHERE dashboard_id = ? "
,
"DELETE FROM star WHERE dashboard_id = ? "
,
"DELETE FROM dashboard WHERE id = ?"
,
"DELETE FROM dashboard WHERE id = ?"
,
"DELETE FROM playlist_item WHERE type = 'dashboard_by_id' AND value = ?"
,
}
}
for
_
,
sql
:=
range
deletes
{
for
_
,
sql
:=
range
deletes
{
...
...
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