DashboardMigrator: Fixed issue migrating incomplete panel link models (#18786)
This commit is contained in:
1 parent
8e9cb5c81a
commit
65a6eda93b
2 files changed
+9
No files matched your search
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user