mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -56,6 +56,7 @@ import { initIconCache } from './core/icons/iconBundle';
|
||||
import { initializeI18n } from './core/internationalization';
|
||||
import { interceptLinkClicks } from './core/navigation/patch/interceptLinkClicks';
|
||||
import { ModalManager } from './core/services/ModalManager';
|
||||
import { NewFrontendAssetsChecker } from './core/services/NewFrontendAssetsChecker';
|
||||
import { backendSrv } from './core/services/backend_srv';
|
||||
import { contextSrv } from './core/services/context_srv';
|
||||
import { Echo } from './core/services/echo/Echo';
|
||||
@@ -218,6 +219,8 @@ export class GrafanaApp {
|
||||
const queryParams = locationService.getSearchObject();
|
||||
const chromeService = new AppChromeService();
|
||||
const keybindingsService = new KeybindingSrv(locationService, chromeService);
|
||||
const newAssetsChecker = new NewFrontendAssetsChecker();
|
||||
newAssetsChecker.start();
|
||||
|
||||
// Read initial kiosk mode from url at app startup
|
||||
chromeService.setKioskModeFromUrl(queryParams.kiosk);
|
||||
@@ -234,6 +237,7 @@ export class GrafanaApp {
|
||||
location: locationService,
|
||||
chrome: chromeService,
|
||||
keybindings: keybindingsService,
|
||||
newAssetsChecker,
|
||||
config,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user