Chore: Remove dashboards from models pkg (#61578)

* Copy dashboard models to dashboard pkg

* Use some models from current pkg instead of models

* Adjust api pkg

* Adjust pkg services

* Fix lint

* Chore: Remove dashboards models

* Remove dashboards from models pkg

* Fix lint in tests

* Fix lint in tests 2

* Fix for import in auth

* Remove newline

* Revert unused fix
This commit is contained in:
idafurjes
2023-01-18 13:52:41 +01:00
committed by GitHub
parent db0be6bc95
commit b573b19ca3
56 changed files with 497 additions and 822 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/api/response"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/publicdashboards/internal/tokens"
. "github.com/grafana/grafana/pkg/services/publicdashboards/models"
"github.com/grafana/grafana/pkg/web"
@@ -30,7 +31,7 @@ func (api *Api) ViewPublicDashboard(c *models.ReqContext) response.Response {
meta := dtos.DashboardMeta{
Slug: dash.Slug,
Type: models.DashTypeDB,
Type: dashboards.DashTypeDB,
CanStar: false,
CanSave: false,
CanEdit: false,