Documentation
¶
Index ¶
- type LibraryPanelService
- func (lps *LibraryPanelService) CleanLibraryPanelsForDashboard(dash *models.Dashboard) error
- func (lps *LibraryPanelService) ConnectLibraryPanelsForDashboard(c context.Context, signedInUser *models.SignedInUser, dash *models.Dashboard) error
- func (lps *LibraryPanelService) ImportLibraryPanelsForDashboard(c context.Context, signedInUser *models.SignedInUser, dash *models.Dashboard, ...) error
- func (lps *LibraryPanelService) LoadLibraryPanelsForDashboard(c context.Context, dash *models.Dashboard) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LibraryPanelService ¶
type LibraryPanelService struct { Cfg *setting.Cfg SQLStore *sqlstore.SQLStore RouteRegister routing.RouteRegister LibraryElementService libraryelements.Service // contains filtered or unexported fields }
LibraryPanelService is the service for the Panel Library feature.
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, sqlStore *sqlstore.SQLStore, routeRegister routing.RouteRegister, libraryElementService libraryelements.Service) *LibraryPanelService
func (*LibraryPanelService) CleanLibraryPanelsForDashboard ¶
func (lps *LibraryPanelService) CleanLibraryPanelsForDashboard(dash *models.Dashboard) error
CleanLibraryPanelsForDashboard loops through all panels in dashboard JSON and cleans up any library panel JSON so that only the necessary JSON properties remain when storing the dashboard JSON.
func (*LibraryPanelService) ConnectLibraryPanelsForDashboard ¶
func (lps *LibraryPanelService) ConnectLibraryPanelsForDashboard(c context.Context, signedInUser *models.SignedInUser, dash *models.Dashboard) error
ConnectLibraryPanelsForDashboard loops through all panels in dashboard JSON and connects any library panels to the dashboard.
func (*LibraryPanelService) ImportLibraryPanelsForDashboard ¶
func (lps *LibraryPanelService) ImportLibraryPanelsForDashboard(c context.Context, signedInUser *models.SignedInUser, dash *models.Dashboard, folderID int64) error
ImportLibraryPanelsForDashboard loops through all panels in dashboard JSON and creates any missing library panels in the database.
func (*LibraryPanelService) LoadLibraryPanelsForDashboard ¶
func (lps *LibraryPanelService) LoadLibraryPanelsForDashboard(c context.Context, dash *models.Dashboard) error
LoadLibraryPanelsForDashboard loops through all panels in dashboard JSON and replaces any library panel JSON with JSON stored for library panel in db.
type Service ¶
type Service interface { LoadLibraryPanelsForDashboard(c context.Context, dash *models.Dashboard) error CleanLibraryPanelsForDashboard(dash *models.Dashboard) error ConnectLibraryPanelsForDashboard(c context.Context, signedInUser *models.SignedInUser, dash *models.Dashboard) error ImportLibraryPanelsForDashboard(c context.Context, signedInUser *models.SignedInUser, dash *models.Dashboard, folderID int64) error }
Service is a service for operating on library panels.