Plugins: Refactor GetPluginDashboards/LoadPluginDashboard (#46316)
Refactors GetPluginDashboards/LoadPluginDashboard by moving database interaction from plugin management to the plugindashboards service. Fixes #44553 Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
co-authored by
Will Browne
parent
d076cabb60
commit
6c7d326499
@@ -14,8 +14,8 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/services/dashboardimport"
|
||||
"github.com/grafana/grafana/pkg/services/plugindashboards"
|
||||
"github.com/grafana/grafana/pkg/services/search"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
"github.com/grafana/grafana/pkg/tests/testinfra"
|
||||
@@ -61,7 +61,7 @@ func TestDashboardQuota(t *testing.T) {
|
||||
})
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
require.NoError(t, err)
|
||||
dashboardDTO := &plugins.PluginDashboardInfoDTO{}
|
||||
dashboardDTO := &plugindashboards.PluginDashboard{}
|
||||
err = json.Unmarshal(b, dashboardDTO)
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, 1, dashboardDTO.DashboardId)
|
||||
|
||||
Reference in New Issue
Block a user