Bootdata: Expose grafanaBootData under /bootdata URL (#104258)

This commit is contained in:
Ryan McKinley
2025-04-25 10:50:03 +01:00
committed by GitHub
parent eed048fc09
commit 73c018b298
6 changed files with 41 additions and 32 deletions
+12
View File
@@ -28,6 +28,18 @@ import (
"github.com/grafana/grafana/pkg/util"
)
// GetBootdataAPI returns the same data we currently have rendered into index.html
// NOTE: this should not be added to the public API docs, and is useful for a transition
// towards a fully static index.html -- this will likely be replaced with multiple calls
func (hs *HTTPServer) GetBootdata(c *contextmodel.ReqContext) {
data, err := hs.setIndexViewData(c)
if err != nil {
c.Handle(hs.Cfg, http.StatusInternalServerError, "Failed to get settings", err)
return
}
c.JSON(http.StatusOK, data)
}
// Returns a file that is easy to check for changes
// Any changes to the file means we should refresh the frontend
func (hs *HTTPServer) GetFrontendAssets(c *contextmodel.ReqContext) {