StateTimeline: Auto-migrate from natel-discrete-panel (#104191)

This commit is contained in:
Ryan McKinley
2025-04-24 15:42:32 +03:00
committed by GitHub
parent 15bddb3712
commit 7fd4c1b41d
2 changed files with 2 additions and 9 deletions
@@ -140,10 +140,7 @@ export const autoMigrateAngular: Record<string, string> = {
'grafana-singlestat-panel': 'stat',
'grafana-piechart-panel': 'piechart',
'grafana-worldmap-panel': 'geomap',
};
export const autoMigrateRemovedPanelPlugins: Record<string, string> = {
'heatmap-new': 'heatmap', // this was a temporary development panel that is now standard
'natel-discrete-panel': 'state-timeline',
};
export class PanelModel implements DataConfigSource, IPanelModel {
@@ -1,10 +1,6 @@
import { autoMigrateRemovedPanelPlugins, autoMigrateAngular } from './PanelModel';
import { autoMigrateAngular } from './PanelModel';
export function getPanelPluginToMigrateTo(panel: any): string | undefined {
if (autoMigrateRemovedPanelPlugins[panel.type]) {
return autoMigrateRemovedPanelPlugins[panel.type];
}
// Graph needs special logic as it can be migrated to multiple panels
if (panel.type === 'graph') {
if (panel.xaxis?.mode === 'series') {