Frontend Service: Pass static config needed for login to index bootData (#110829)
add almost all config needed for login
This commit is contained in:
@@ -249,13 +249,22 @@
|
||||
}
|
||||
|
||||
async function initGrafana() {
|
||||
const rawBootData = await loadBootData();
|
||||
|
||||
// global config
|
||||
window.grafanaBootData = {
|
||||
_femt: true, // isFrontendService() needs this
|
||||
...rawBootData,
|
||||
assets: [[.Assets]],
|
||||
navTree: [],
|
||||
settings: [[.Settings]],
|
||||
user: [[.DefaultUser]],
|
||||
}
|
||||
|
||||
// tenant-specific config
|
||||
// TODO split this into separate API calls
|
||||
const { navTree, settings, user } = await loadBootData();
|
||||
window.grafanaBootData.settings = settings;
|
||||
window.grafanaBootData.navTree = navTree;
|
||||
window.grafanaBootData.user = user;
|
||||
|
||||
// The per-theme CSS still contains some global styles needed
|
||||
// to render the page correctly.
|
||||
const cssLink = document.createElement("link");
|
||||
|
||||
Reference in New Issue
Block a user