mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DashboardMigrator: Fixed issue migrating incomplete panel link models (#18786)
This commit is contained in:
parent
8e9cb5c81a
commit
65a6eda93b
@ -415,6 +415,10 @@ describe('DashboardModel', () => {
|
||||
dashUri: '',
|
||||
title: 'test',
|
||||
},
|
||||
{
|
||||
type: 'dashboard',
|
||||
keepTime: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -643,6 +643,11 @@ function upgradePanelLink(link: any): DataLink {
|
||||
url = `/dashboard/${link.dashUri}`;
|
||||
}
|
||||
|
||||
// some models are incomplete and have no dashboard or dashUri
|
||||
if (!url) {
|
||||
url = '/';
|
||||
}
|
||||
|
||||
if (link.keepTime) {
|
||||
url = appendQueryToUrl(url, `$${DataLinkBuiltInVars.keepTime}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user