Dashboards: Split GetDashboardVersions method (#49967)
* Split GetDashboarVersions method * Add sqlstore dialect and tests * Fix signature of PAtchPreference * Add GetDialect to sqlstore and remove GetDashboardVersions * Add GetDialect to db interface * Implement List * add deleted test function * Remove GetDialect from sqlstore interface * Remove deleted method from mock * Refactor test
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
var (
|
||||
ErrDashboardVersionNotFound = errors.New("dashboard version not found")
|
||||
ErrNoVersionsForDashboardId = errors.New("no dashboard versions found for the given DashboardId")
|
||||
ErrNoVersionsForDashboardID = errors.New("no dashboard versions found for the given DashboardId")
|
||||
)
|
||||
|
||||
type DashboardVersion struct {
|
||||
@@ -35,3 +35,23 @@ type GetDashboardVersionQuery struct {
|
||||
type DeleteExpiredVersionsCommand struct {
|
||||
DeletedRows int64
|
||||
}
|
||||
|
||||
type ListDashboardVersionsQuery struct {
|
||||
DashboardID int64
|
||||
DashboardUID string
|
||||
OrgID int64
|
||||
Limit int
|
||||
Start int
|
||||
}
|
||||
|
||||
type DashboardVersionDTO struct {
|
||||
ID int64 `json:"id"`
|
||||
DashboardID int64 `json:"dashboardId"`
|
||||
DashboardUID string `json:"dashboardUid"`
|
||||
ParentVersion int `json:"parentVersion"`
|
||||
RestoredFrom int `json:"restoredFrom"`
|
||||
Version int `json:"version"`
|
||||
Created time.Time `json:"created"`
|
||||
CreatedBy string `json:"createdBy"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user