provisioning: simplify db query

the GetProvisionedDashboardQuery wasent used for anything
else than check if a dashboard is provisioned or not. So
we simplified this query to make it more maintainable.
This commit is contained in:
bergquist
2018-04-10 12:30:37 +02:00
parent 0f9b592428
commit 949484b949
8 changed files with 41 additions and 53 deletions
+4 -4
View File
@@ -33,8 +33,8 @@ var (
ErrDashboardInvalidUid = errors.New("uid contains illegal characters")
ErrDashboardUidToLong = errors.New("uid to long. max 40 characters")
ErrDashboardCannotSaveProvisionedDashboard = errors.New("Cannot save provisioned dashboard")
ErrDashboardProvisioningDoesNotExist = errors.New("Dashboard provisioning does not exist")
RootFolderName = "General"
//ErrDashboardProvisioningDoesNotExist = errors.New("Dashboard provisioning does not exist")
RootFolderName = "General"
)
type UpdatePluginDashboardError struct {
@@ -319,10 +319,10 @@ type GetDashboardSlugByIdQuery struct {
Result string
}
type GetProvisionedDashboardByDashboardId struct {
type IsDashboardProvisionedQuery struct {
DashboardId int64
Result *DashboardProvisioning
Result bool
}
type GetProvisionedDashboardDataQuery struct {