Deprecation: Create explicit feature toggles for remaining panels (#82217)

This commit is contained in:
Nathan Marrs 2024-02-14 09:06:25 -07:00 committed by GitHub
parent c8ba2163e9
commit ce750e0618
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 315 additions and 123 deletions

View File

@ -43,6 +43,102 @@
"type": "link", "type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateGraphPanel=false" "url": " /d/cdd412c4/?__feature.autoMigrateGraphPanel=false"
}, },
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate table (old) panel (TRUE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateTablePanel=true"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate table (old) panel (FALSE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateTablePanel=false"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate piechart panel (TRUE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigratePiechartPanel=true"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate piechart panel (FALSE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigratePiechartPanel=false"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate worldmap panel (TRUE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateWorldmapPanel=true"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate worldmap panel (FALSE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateWorldmapPanel=false"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate stat panel (TRUE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateStatPanel=true"
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Auto migrate stat panel (FALSE)",
"tooltip": "",
"type": "link",
"url": " /d/cdd412c4/?__feature.autoMigrateStatPanel=false"
},
{ {
"asDropdown": false, "asDropdown": false,
"icon": "external link", "icon": "external link",
@ -105,57 +201,7 @@
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "unit": "short"
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short",
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@ -195,7 +241,7 @@
} }
}, },
"percentage": false, "percentage": false,
"pluginVersion": "9.5.0-pre", "pluginVersion": "10.4.0-pre",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -265,7 +311,7 @@
"content": "# Graph panel >> Timeseries panel\n\nKnown issues:\n* hiding null/empty series\n* time regions", "content": "# Graph panel >> Timeseries panel\n\nKnown issues:\n* hiding null/empty series\n* time regions",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "10.3.0-pre", "pluginVersion": "10.4.0-pre",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@ -377,7 +423,7 @@
"content": "# Table (old) >> Table\n\nKnown issues:\n* wrapping text\n* style changes", "content": "# Table (old) >> Table\n\nKnown issues:\n* wrapping text\n* style changes",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "10.3.0-pre", "pluginVersion": "10.4.0-pre",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@ -417,7 +463,6 @@
"y": 21 "y": 21
}, },
"id": 9, "id": 9,
"links": [],
"mappingType": 1, "mappingType": 1,
"mappingTypes": [ "mappingTypes": [
{ {
@ -498,7 +543,6 @@
"y": 21 "y": 21
}, },
"id": 23, "id": 23,
"links": [],
"mappingType": 1, "mappingType": 1,
"mappingTypes": [ "mappingTypes": [
{ {
@ -574,7 +618,7 @@
"content": "# Singlestat >> Stat\n\nKnown issues:\n* limited options", "content": "# Singlestat >> Stat\n\nKnown issues:\n* limited options",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "10.3.0-pre", "pluginVersion": "10.4.0-pre",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@ -661,7 +705,7 @@
"content": "# grafana-piechart-panel >> piechart\n\nKnown issues:\n* TBD", "content": "# grafana-piechart-panel >> piechart\n\nKnown issues:\n* TBD",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "10.3.0-pre", "pluginVersion": "10.4.0-pre",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@ -675,38 +719,54 @@
"type": "text" "type": "text"
}, },
{ {
"circleMaxSize": 30,
"circleMinSize": 2,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": { "datasource": {
"type": "grafana-testdata-datasource", "type": "grafana-testdata-datasource",
"uid": "PD8C576611E62080A" "uid": "PD8C576611E62080A"
}, },
"decimals": 0, "fieldConfig": {
"esMetric": "Count", "defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(245, 54, 54, 0.9)"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 0
},
{
"color": "rgba(50, 172, 45, 0.97)",
"value": 10
}
]
}
},
"overrides": []
},
"gridPos": { "gridPos": {
"h": 10, "h": 10,
"w": 16, "w": 16,
"x": 0, "x": 0,
"y": 39 "y": 39
}, },
"hideEmpty": false,
"hideZero": false,
"id": 26, "id": 26,
"initialZoom": 1,
"locationData": "countries",
"mapCenter": "(0°, 0°)",
"mapCenterLatitude": 0,
"mapCenterLongitude": 0,
"maxDataPoints": 1, "maxDataPoints": 1,
"mouseWheelZoom": false,
"options": { "options": {
"basemap": {
"name": "Basemap",
"type": "default"
},
"controls": { "controls": {
"mouseWheelZoom": true, "mouseWheelZoom": false,
"showAttribution": true, "showAttribution": true,
"showDebug": false, "showDebug": false,
"showMeasure": false, "showMeasure": false,
@ -730,7 +790,7 @@
}, },
"size": { "size": {
"fixed": 5, "fixed": 5,
"max": 15, "max": 30,
"min": 2 "min": 2
}, },
"symbol": { "symbol": {
@ -751,9 +811,10 @@
} }
}, },
"location": { "location": {
"mode": "auto" "gazetteer": "public/gazetteer/countries.json",
"mode": "lookup"
}, },
"name": "Layer 1", "name": "Layer 0",
"tooltip": true, "tooltip": true,
"type": "markers" "type": "markers"
} }
@ -769,16 +830,7 @@
"zoom": 1 "zoom": 1
} }
}, },
"pluginVersion": "10.3.0-pre", "pluginVersion": "10.4.0-pre",
"showLegend": true,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "metric",
"queryType": "geohash"
},
"targets": [ "targets": [
{ {
"csvFileName": "flight_info_by_state.csv", "csvFileName": "flight_info_by_state.csv",
@ -790,7 +842,6 @@
"scenarioId": "csv_file" "scenarioId": "csv_file"
} }
], ],
"thresholds": "0,10",
"title": "grafana-worldmap-panel", "title": "grafana-worldmap-panel",
"transformations": [ "transformations": [
{ {
@ -798,12 +849,17 @@
"options": { "options": {
"reducers": [] "reducers": []
} }
},
{
"id": "reduce",
"options": {
"reducers": [
"sum"
]
}
} }
], ],
"type": "grafana-worldmap-panel", "type": "grafana-worldmap-panel"
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
}, },
{ {
"datasource": { "datasource": {
@ -826,7 +882,7 @@
"content": "# grafana-worldmap-panel >> geomap\n\nKnown issues:\n* TBD", "content": "# grafana-worldmap-panel >> geomap\n\nKnown issues:\n* TBD",
"mode": "markdown" "mode": "markdown"
}, },
"pluginVersion": "10.3.0-pre", "pluginVersion": "10.4.0-pre",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@ -858,6 +914,6 @@
"timezone": "", "timezone": "",
"title": "Devenv - Panel migrations", "title": "Devenv - Panel migrations",
"uid": "cdd412c4", "uid": "cdd412c4",
"version": 34, "version": 67,
"weekStart": "" "weekStart": ""
} }

View File

@ -65,6 +65,10 @@ Some features are enabled by default. You can disable these feature by setting t
| `migrationLocking` | Lock database during migrations | | `migrationLocking` | Lock database during migrations |
| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) | | `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) |
| `autoMigrateGraphPanel` | Migrate old graph panel to supported time series panel - broken out from autoMigrateOldPanels to enable granular tracking | | `autoMigrateGraphPanel` | Migrate old graph panel to supported time series panel - broken out from autoMigrateOldPanels to enable granular tracking |
| `autoMigrateTablePanel` | Migrate old table panel to supported table panel - broken out from autoMigrateOldPanels to enable granular tracking |
| `autoMigratePiechartPanel` | Migrate old piechart panel to supported piechart panel - broken out from autoMigrateOldPanels to enable granular tracking |
| `autoMigrateWorldmapPanel` | Migrate old worldmap panel to supported geomap panel - broken out from autoMigrateOldPanels to enable granular tracking |
| `autoMigrateStatPanel` | Migrate old stat panel to supported stat panel - broken out from autoMigrateOldPanels to enable granular tracking |
| `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. | | `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. |
| `newVizTooltips` | New visualizations tooltips UX | | `newVizTooltips` | New visualizations tooltips UX |
| `grpcServer` | Run the GRPC server | | `grpcServer` | Run the GRPC server |

View File

@ -34,6 +34,10 @@ export interface FeatureToggles {
traceToMetrics?: boolean; traceToMetrics?: boolean;
autoMigrateOldPanels?: boolean; autoMigrateOldPanels?: boolean;
autoMigrateGraphPanel?: boolean; autoMigrateGraphPanel?: boolean;
autoMigrateTablePanel?: boolean;
autoMigratePiechartPanel?: boolean;
autoMigrateWorldmapPanel?: boolean;
autoMigrateStatPanel?: boolean;
disableAngular?: boolean; disableAngular?: boolean;
canvasPanelNesting?: boolean; canvasPanelNesting?: boolean;
newVizTooltips?: boolean; newVizTooltips?: boolean;

View File

@ -129,6 +129,34 @@ var (
FrontendOnly: true, FrontendOnly: true,
Owner: grafanaDatavizSquad, Owner: grafanaDatavizSquad,
}, },
{
Name: "autoMigrateTablePanel",
Description: "Migrate old table panel to supported table panel - broken out from autoMigrateOldPanels to enable granular tracking",
Stage: FeatureStagePublicPreview,
FrontendOnly: true,
Owner: grafanaDatavizSquad,
},
{
Name: "autoMigratePiechartPanel",
Description: "Migrate old piechart panel to supported piechart panel - broken out from autoMigrateOldPanels to enable granular tracking",
Stage: FeatureStagePublicPreview,
FrontendOnly: true,
Owner: grafanaDatavizSquad,
},
{
Name: "autoMigrateWorldmapPanel",
Description: "Migrate old worldmap panel to supported geomap panel - broken out from autoMigrateOldPanels to enable granular tracking",
Stage: FeatureStagePublicPreview,
FrontendOnly: true,
Owner: grafanaDatavizSquad,
},
{
Name: "autoMigrateStatPanel",
Description: "Migrate old stat panel to supported stat panel - broken out from autoMigrateOldPanels to enable granular tracking",
Stage: FeatureStagePublicPreview,
FrontendOnly: true,
Owner: grafanaDatavizSquad,
},
{ {
Name: "disableAngular", Name: "disableAngular",
Description: "Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime.", Description: "Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime.",

View File

@ -15,6 +15,10 @@ datasourceQueryMultiStatus,experimental,@grafana/plugins-platform-backend,false,
traceToMetrics,experimental,@grafana/observability-traces-and-profiling,false,false,true traceToMetrics,experimental,@grafana/observability-traces-and-profiling,false,false,true
autoMigrateOldPanels,preview,@grafana/dataviz-squad,false,false,true autoMigrateOldPanels,preview,@grafana/dataviz-squad,false,false,true
autoMigrateGraphPanel,preview,@grafana/dataviz-squad,false,false,true autoMigrateGraphPanel,preview,@grafana/dataviz-squad,false,false,true
autoMigrateTablePanel,preview,@grafana/dataviz-squad,false,false,true
autoMigratePiechartPanel,preview,@grafana/dataviz-squad,false,false,true
autoMigrateWorldmapPanel,preview,@grafana/dataviz-squad,false,false,true
autoMigrateStatPanel,preview,@grafana/dataviz-squad,false,false,true
disableAngular,preview,@grafana/dataviz-squad,false,false,true disableAngular,preview,@grafana/dataviz-squad,false,false,true
canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,true canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,true
newVizTooltips,preview,@grafana/dataviz-squad,false,false,true newVizTooltips,preview,@grafana/dataviz-squad,false,false,true

1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
15 traceToMetrics experimental @grafana/observability-traces-and-profiling false false true
16 autoMigrateOldPanels preview @grafana/dataviz-squad false false true
17 autoMigrateGraphPanel preview @grafana/dataviz-squad false false true
18 autoMigrateTablePanel preview @grafana/dataviz-squad false false true
19 autoMigratePiechartPanel preview @grafana/dataviz-squad false false true
20 autoMigrateWorldmapPanel preview @grafana/dataviz-squad false false true
21 autoMigrateStatPanel preview @grafana/dataviz-squad false false true
22 disableAngular preview @grafana/dataviz-squad false false true
23 canvasPanelNesting experimental @grafana/dataviz-squad false false true
24 newVizTooltips preview @grafana/dataviz-squad false false true

View File

@ -71,6 +71,22 @@ const (
// Migrate old graph panel to supported time series panel - broken out from autoMigrateOldPanels to enable granular tracking // Migrate old graph panel to supported time series panel - broken out from autoMigrateOldPanels to enable granular tracking
FlagAutoMigrateGraphPanel = "autoMigrateGraphPanel" FlagAutoMigrateGraphPanel = "autoMigrateGraphPanel"
// FlagAutoMigrateTablePanel
// Migrate old table panel to supported table panel - broken out from autoMigrateOldPanels to enable granular tracking
FlagAutoMigrateTablePanel = "autoMigrateTablePanel"
// FlagAutoMigratePiechartPanel
// Migrate old piechart panel to supported piechart panel - broken out from autoMigrateOldPanels to enable granular tracking
FlagAutoMigratePiechartPanel = "autoMigratePiechartPanel"
// FlagAutoMigrateWorldmapPanel
// Migrate old worldmap panel to supported geomap panel - broken out from autoMigrateOldPanels to enable granular tracking
FlagAutoMigrateWorldmapPanel = "autoMigrateWorldmapPanel"
// FlagAutoMigrateStatPanel
// Migrate old stat panel to supported stat panel - broken out from autoMigrateOldPanels to enable granular tracking
FlagAutoMigrateStatPanel = "autoMigrateStatPanel"
// FlagDisableAngular // FlagDisableAngular
// Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. // Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime.
FlagDisableAngular = "disableAngular" FlagDisableAngular = "disableAngular"

View File

@ -2079,6 +2079,58 @@
"codeowner": "@grafana/grafana-app-platform-squad", "codeowner": "@grafana/grafana-app-platform-squad",
"requiresRestart": true "requiresRestart": true
} }
},
{
"metadata": {
"name": "autoMigrateStatPanel",
"resourceVersion": "1707922335937",
"creationTimestamp": "2024-02-14T14:52:15Z"
},
"spec": {
"description": "Migrate old stat panel to supported stat panel - broken out from autoMigrateOldPanels to enable granular tracking",
"stage": "preview",
"codeowner": "@grafana/dataviz-squad",
"frontend": true
}
},
{
"metadata": {
"name": "autoMigratePiechartPanel",
"resourceVersion": "1707922335937",
"creationTimestamp": "2024-02-14T14:52:15Z"
},
"spec": {
"description": "Migrate old piechart panel to supported piechart panel - broken out from autoMigrateOldPanels to enable granular tracking",
"stage": "preview",
"codeowner": "@grafana/dataviz-squad",
"frontend": true
}
},
{
"metadata": {
"name": "autoMigrateTablePanel",
"resourceVersion": "1707922335937",
"creationTimestamp": "2024-02-14T14:52:15Z"
},
"spec": {
"description": "Migrate old table panel to supported table panel - broken out from autoMigrateOldPanels to enable granular tracking",
"stage": "preview",
"codeowner": "@grafana/dataviz-squad",
"frontend": true
}
},
{
"metadata": {
"name": "autoMigrateWorldmapPanel",
"resourceVersion": "1707922335937",
"creationTimestamp": "2024-02-14T14:52:15Z"
},
"spec": {
"description": "Migrate old worldmap panel to supported geomap panel - broken out from autoMigrateOldPanels to enable granular tracking",
"stage": "preview",
"codeowner": "@grafana/dataviz-squad",
"frontend": true
}
} }
] ]
} }

View File

@ -44,7 +44,7 @@ import { getTimeSrv } from '../services/TimeSrv';
import { mergePanels, PanelMergeInfo } from '../utils/panelMerge'; import { mergePanels, PanelMergeInfo } from '../utils/panelMerge';
import { DashboardMigrator } from './DashboardMigrator'; import { DashboardMigrator } from './DashboardMigrator';
import { PanelModel, autoMigrateAngular, explicitlyControlledMigrationPanels } from './PanelModel'; import { PanelModel } from './PanelModel';
import { TimeModel } from './TimeModel'; import { TimeModel } from './TimeModel';
import { deleteScopeVars, isOnTheSameGridRow } from './utils'; import { deleteScopeVars, isOnTheSameGridRow } from './utils';
@ -170,33 +170,54 @@ export class DashboardModel implements TimeModel {
this.updateSchema(data); this.updateSchema(data);
// Auto-migrate old angular panels // Auto-migrate old angular panels
if (options?.autoMigrateOldPanels || !config.angularSupportEnabled || config.featureToggles.autoMigrateOldPanels) { const shouldMigrateAllAngularPanels =
for (const p of this.panelIterator()) { options?.autoMigrateOldPanels || !config.angularSupportEnabled || config.featureToggles.autoMigrateOldPanels;
const newType = autoMigrateAngular[p.type];
// Skip explicitly controlled panels const shouldMigrateExplicitAngularPanels =
if (explicitlyControlledMigrationPanels.includes(p.type)) { config.featureToggles.autoMigrateGraphPanel ||
continue; config.featureToggles.autoMigrateTablePanel ||
} config.featureToggles.autoMigratePiechartPanel ||
config.featureToggles.autoMigrateWorldmapPanel ||
config.featureToggles.autoMigrateStatPanel;
if (!p.autoMigrateFrom && newType) { // Handles both granular and all angular panel migration
p.autoMigrateFrom = p.type; if (shouldMigrateAllAngularPanels || shouldMigrateExplicitAngularPanels) {
p.type = newType; for (const panel of this.panelIterator()) {
} if (
} !panel.autoMigrateFrom &&
} panel.type === 'graph' &&
(config.featureToggles.autoMigrateGraphPanel || shouldMigrateAllAngularPanels)
// Explicit handling of graph -> time series migration (and eventually others) ) {
if ( panel.autoMigrateFrom = panel.type;
options?.autoMigrateOldPanels || panel.type = 'timeseries';
!config.angularSupportEnabled || } else if (
config.featureToggles.autoMigrateOldPanels || !panel.autoMigrateFrom &&
config.featureToggles.autoMigrateGraphPanel panel.type === 'table-old' &&
) { (config.featureToggles.autoMigrateTablePanel || shouldMigrateAllAngularPanels)
for (const p of this.panelIterator()) { ) {
if (!p.autoMigrateFrom && p.type === 'graph') { panel.autoMigrateFrom = panel.type;
p.autoMigrateFrom = p.type; panel.type = 'table';
p.type = 'timeseries'; } else if (
!panel.autoMigrateFrom &&
panel.type === 'grafana-piechart-panel' &&
(config.featureToggles.autoMigratePiechartPanel || shouldMigrateAllAngularPanels)
) {
panel.autoMigrateFrom = panel.type;
panel.type = 'piechart';
} else if (
!panel.autoMigrateFrom &&
panel.type === 'grafana-worldmap-panel' &&
(config.featureToggles.autoMigrateWorldmapPanel || shouldMigrateAllAngularPanels)
) {
panel.autoMigrateFrom = panel.type;
panel.type = 'geomap';
} else if (
!panel.autoMigrateFrom &&
(panel.type === 'singlestat' || panel.type === 'grafana-singlestat-panel') &&
(config.featureToggles.autoMigrateStatPanel || shouldMigrateAllAngularPanels)
) {
panel.autoMigrateFrom = panel.type;
panel.type = 'stat';
} }
} }
} }

View File

@ -130,7 +130,14 @@ const defaults: any = {
title: '', title: '',
}; };
export const explicitlyControlledMigrationPanels = ['graph']; export const explicitlyControlledMigrationPanels = [
'graph',
'table-old',
'grafana-piechart-panel',
'grafana-worldmap-panel',
'singlestat',
'grafana-singlestat-panel',
];
export const autoMigrateAngular: Record<string, string> = { export const autoMigrateAngular: Record<string, string> = {
graph: 'timeseries', graph: 'timeseries',