[Alerting]: Use title instead of slug for retrieving the namespace (#32957)

* [Alerting]: Use title instead of slug for retrieving the namespace

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Sofia Papagiannaki
2021-04-14 12:02:50 +03:00
committed by GitHub
parent b0470c84a5
commit 8848d825e0
6 changed files with 41 additions and 14 deletions

View File

@@ -6,6 +6,8 @@ import "github.com/grafana/grafana/pkg/models"
type Store interface {
// ValidateDashboardBeforeSave validates a dashboard before save.
ValidateDashboardBeforeSave(dashboard *models.Dashboard, overwrite bool) (bool, error)
// GetFolderByTitle retrieves a dashboard by its title and is used by unified alerting
GetFolderByTitle(orgID int64, title string) (*models.Dashboard, error)
GetProvisionedDataByDashboardID(dashboardID int64) (*models.DashboardProvisioning, error)
GetProvisionedDashboardData(name string) ([]*models.DashboardProvisioning, error)
SaveProvisionedDashboard(cmd models.SaveDashboardCommand, provisioning *models.DashboardProvisioning) (*models.Dashboard, error)