Frontend: Reload the browser when backend configuration/assets change (#79057)

* Detect frontend asset changes

* Update

* merge main

* Frontend: Detect new assets / versions / config changes (#79258)

* avoid first check

* Updates and add tests

* Update

* Update

* Updated code

* refine

* use context

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Torkel Ödegaard
2024-01-04 08:00:07 +01:00
committed by GitHub
parent 7210e378b8
commit e924627659
21 changed files with 433 additions and 68 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/grafana/grafana/pkg/services/authn"
"github.com/grafana/grafana/pkg/services/authn/authntest"
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
"github.com/grafana/grafana/pkg/services/licensing"
"github.com/grafana/grafana/pkg/services/user/usertest"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/web"
@@ -62,7 +63,7 @@ func recoveryScenario(t *testing.T, desc string, url string, fn scenarioFunc) {
require.NoError(t, err)
sc.m = web.New()
sc.m.UseMiddleware(Recovery(cfg))
sc.m.UseMiddleware(Recovery(cfg, &licensing.OSSLicensingService{}))
sc.m.Use(AddDefaultResponseHeaders(cfg))
sc.m.UseMiddleware(web.Renderer(viewsPath, "[[", "]]"))