Commit 6f3f0bf3 by Torkel Ödegaard Committed by GitHub

PanelLinks: fixed issue with old panel links and grafana behind a subpath (#20298)

parent 422a9470
......@@ -438,7 +438,7 @@ describe('DashboardModel', () => {
});
it('should slugify dashboard name', () => {
expect(model.panels[0].links[3].url).toBe(`/dashboard/db/my-other-dashboard`);
expect(model.panels[0].links[3].url).toBe(`dashboard/db/my-other-dashboard`);
});
});
......
......@@ -685,11 +685,11 @@ function upgradePanelLink(link: any): DataLink {
let url = link.url;
if (!url && link.dashboard) {
url = `/dashboard/db/${kbn.slugifyForUrl(link.dashboard)}`;
url = `dashboard/db/${kbn.slugifyForUrl(link.dashboard)}`;
}
if (!url && link.dashUri) {
url = `/dashboard/${link.dashUri}`;
url = `dashboard/${link.dashUri}`;
}
// some models are incomplete and have no dashboard or dashUri
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment