mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 03:34:15 -06:00
PanelLinks: fixed issue with old panel links and grafana behind a subpath (#20298)
This commit is contained in:
parent
422a94707d
commit
6f3f0bf3e0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user