mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
refactoring: moved compare dashboard version command out of sqlstore, the code in this command did not use any sql operations and was more high level, could be moved out and use existing queries to get the versions
This commit is contained in:
@@ -7,14 +7,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
)
|
||||
|
||||
type DiffType int
|
||||
|
||||
const (
|
||||
DiffJSON DiffType = iota
|
||||
DiffBasic
|
||||
DiffDelta
|
||||
)
|
||||
|
||||
var (
|
||||
ErrDashboardVersionNotFound = errors.New("Dashboard version not found")
|
||||
ErrNoVersionsForDashboardId = errors.New("No dashboard versions found for the given DashboardId")
|
||||
@@ -77,18 +69,3 @@ type GetDashboardVersionsQuery struct {
|
||||
|
||||
Result []*DashboardVersionDTO
|
||||
}
|
||||
|
||||
//
|
||||
// Commands
|
||||
//
|
||||
|
||||
// CompareDashboardVersionsCommand is used to compare two versions.
|
||||
type CompareDashboardVersionsCommand struct {
|
||||
OrgId int64
|
||||
DashboardId int64
|
||||
BaseVersion int
|
||||
NewVersion int
|
||||
DiffType DiffType
|
||||
|
||||
Delta []byte `json:"delta"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user