grafana/scenes

${__org.name} does not work

Opened this issue · 1 comments

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:
Monosnap Monview App - Apps - Grafana 2024-06-12 13-02-11
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:
Monosnap Edit panel - New dashboard - Dashboards - Grafana 2024-06-12 13-04-59

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,
      }),
    ],
  });