mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Angular: auto-migrate graph panel when angular is disabled (#59247)
This commit is contained in:
@@ -237,11 +237,17 @@ export class PanelModel implements DataConfigSource, IPanelModel {
|
||||
|
||||
switch (this.type) {
|
||||
case 'graph':
|
||||
if (config?.featureToggles?.autoMigrateGraphPanels) {
|
||||
if (config.featureToggles?.autoMigrateGraphPanels || !config.angularSupportEnabled) {
|
||||
this.autoMigrateFrom = this.type;
|
||||
this.type = 'timeseries';
|
||||
}
|
||||
break;
|
||||
case 'table-old':
|
||||
if (!config.angularSupportEnabled) {
|
||||
this.autoMigrateFrom = this.type;
|
||||
this.type = 'table';
|
||||
}
|
||||
break;
|
||||
case 'heatmap-new':
|
||||
this.autoMigrateFrom = this.type;
|
||||
this.type = 'heatmap';
|
||||
@@ -416,7 +422,7 @@ export class PanelModel implements DataConfigSource, IPanelModel {
|
||||
const version = getPluginVersion(plugin);
|
||||
|
||||
if (this.autoMigrateFrom) {
|
||||
const wasAngular = this.autoMigrateFrom === 'graph';
|
||||
const wasAngular = this.autoMigrateFrom === 'graph' || this.autoMigrateFrom === 'table-old';
|
||||
this.callPanelTypeChangeHandler(
|
||||
plugin,
|
||||
this.autoMigrateFrom,
|
||||
|
||||
Reference in New Issue
Block a user