mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Chore: Fix various spelling errors in back-end code Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>>
31 lines
859 B
Go
31 lines
859 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
"github.com/grafana/grafana/pkg/models"
|
|
)
|
|
|
|
func (server *HTTPServer) AdminProvisioningReloadDashboards(c *models.ReqContext) Response {
|
|
err := server.ProvisioningService.ProvisionDashboards()
|
|
if err != nil && err != context.Canceled {
|
|
return Error(500, "", err)
|
|
}
|
|
return Success("Dashboards config reloaded")
|
|
}
|
|
|
|
func (server *HTTPServer) AdminProvisioningReloadDatasources(c *models.ReqContext) Response {
|
|
err := server.ProvisioningService.ProvisionDatasources()
|
|
if err != nil {
|
|
return Error(500, "", err)
|
|
}
|
|
return Success("Datasources config reloaded")
|
|
}
|
|
|
|
func (server *HTTPServer) AdminProvisioningReloadNotifications(c *models.ReqContext) Response {
|
|
err := server.ProvisioningService.ProvisionNotifications()
|
|
if err != nil {
|
|
return Error(500, "", err)
|
|
}
|
|
return Success("Notifications config reloaded")
|
|
}
|