Chore: Move search model from models package to search service (#62215)
* Chore: Move search model from models package to search service * Remove unused imports * Cleanup after merge
This commit is contained in:
+3
-3
@@ -9,7 +9,6 @@ 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/alerting"
|
||||
alertmodels "github.com/grafana/grafana/pkg/services/alerting/models"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
@@ -19,6 +18,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/ngalert/notifier/channels_config"
|
||||
"github.com/grafana/grafana/pkg/services/notifications"
|
||||
"github.com/grafana/grafana/pkg/services/search"
|
||||
"github.com/grafana/grafana/pkg/services/search/model"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
@@ -109,7 +109,7 @@ func (hs *HTTPServer) GetAlerts(c *contextmodel.ReqContext) response.Response {
|
||||
Limit: 1000,
|
||||
OrgId: c.OrgID,
|
||||
DashboardIds: dashboardIDs,
|
||||
Type: string(models.DashHitDB),
|
||||
Type: string(model.DashHitDB),
|
||||
FolderIds: folderIDs,
|
||||
Permission: dashboards.PERMISSION_VIEW,
|
||||
}
|
||||
@@ -120,7 +120,7 @@ func (hs *HTTPServer) GetAlerts(c *contextmodel.ReqContext) response.Response {
|
||||
}
|
||||
|
||||
for _, d := range searchQuery.Result {
|
||||
if d.Type == models.DashHitDB && d.ID > 0 {
|
||||
if d.Type == model.DashHitDB && d.ID > 0 {
|
||||
dashboardIDs = append(dashboardIDs, d.ID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user