${__org.name} does not work
Opened this issue · 1 comments
korinekgergely commented
SCENES
Question 1
I tried it in a simple application and the global variable ${__org.name} does not work. The code:
const getOrganizationScene = () => {
return new EmbeddedScene({
body: new SceneFlexLayout({
children: [
new SceneFlexItem({
body: PanelBuilders.text().setTitle("Title: ${__org.name}").build(),
}),
],
}),
});
};
Result:
Interestingly, and definitely worth noting, it works on the dashboard. Why not in the app? Have I implemented something incorrectly? I know, it's hard to debug remotely, maybe I missed some important step.
Dahboard:
Question 2
Is it possible to use these global variables in a SceneApp title (like in my example)? Maybe in the future, or somehow already now?
const getScene = () =>
new SceneApp({
pages: [
new SceneAppPage({
title: 'Organization ${__org.name}',
url: prefixRoute(`${ROUTES.Organization}`),
hideFromBreadcrumbs: true,
getScene: getOrganizationScene,
}),
],
});
leslie-alldridge commented
Just a guess but I think you might need a custom macro? https://grafana.com/developers/scenes/advanced-variables#custom-variable-macros