Migration v42: HideFrom tooltip consistency migration (#110517)

* Migration to be verified: v42 HideFrom tooltip migration

* snap update

* make gen cue

* Add comments of 42 being the final version
This commit is contained in:
Dominik Prokop
2025-09-05 15:07:30 +02:00
committed by GitHub
parent 801fde02a7
commit b4e63c36c3
59 changed files with 934 additions and 69 deletions
@@ -78,7 +78,7 @@ lineage: schemas: [{
// Version of the JSON schema, incremented each time a Grafana update brings
// changes to said schema.
schemaVersion: uint16 | *41
schemaVersion: uint16 | *42
// Version of the dashboard, incremented each time the dashboard is updated.
version?: uint32
@@ -78,7 +78,7 @@ lineage: schemas: [{
// Version of the JSON schema, incremented each time a Grafana update brings
// changes to said schema.
schemaVersion: uint16 | *41
schemaVersion: uint16 | *42
// Version of the dashboard, incremented each time the dashboard is updated.
version?: uint32
@@ -278,15 +278,15 @@ func TestConversionMetrics(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{UID: "test-uid-2"},
Spec: common.Unstructured{Object: map[string]any{
"title": "test dashboard",
"schemaVersion": 41,
"schemaVersion": 42,
}},
},
target: &dashv0.Dashboard{},
expectSuccess: true,
expectedSourceAPI: dashv1.APIVERSION,
expectedTargetAPI: dashv0.APIVERSION,
expectedSourceSchema: "41",
expectedTargetSchema: "41", // V1→V0 keeps same schema version
expectedSourceSchema: "42",
expectedTargetSchema: "42", // V1→V0 keeps same schema version
},
{
name: "successful v2alpha1 to v2beta1 conversion",
@@ -600,7 +600,7 @@ func TestConversionLogging(t *testing.T) {
"targetVersionAPI": dashv1.APIVERSION,
"dashboardUID": "test-uid-log-1",
"sourceSchemaVersion": "20",
"targetSchemaVersion": fmt.Sprintf("%d", 41), // LATEST_VERSION
"targetSchemaVersion": fmt.Sprintf("%d", 42), // LATEST_VERSION
},
},
{
@@ -620,7 +620,7 @@ func TestConversionLogging(t *testing.T) {
"targetVersionAPI": dashv1.APIVERSION,
"dashboardUID": "test-uid-log-2",
"sourceSchemaVersion": "5",
"targetSchemaVersion": fmt.Sprintf("%d", 41), // LATEST_VERSION
"targetSchemaVersion": fmt.Sprintf("%d", 42), // LATEST_VERSION
},
},
}
@@ -8,7 +8,7 @@ import (
const (
MIN_VERSION = 13
LATEST_VERSION = 41
LATEST_VERSION = 42
// The pluginVersion to set after simulating auto-migrate for angular panels
pluginVersionForAutoMigrate = "12.1.0"
@@ -66,6 +66,7 @@ func GetMigrations(dsInfoProvider DataSourceInfoProvider) map[int]SchemaVersionM
39: V39,
40: V40,
41: V41,
42: V42,
}
}
@@ -0,0 +1,102 @@
package schemaversion
import "context"
// V42 ensures that when a field is hidden from visualization, it is also hidden from tooltips.
//
// This migration addresses the inconsistency where fields could be hidden from visualizations
// (hideFrom.viz = true) but would still appear in tooltips. To prevent user confusion and ensure
// consistent behavior, this migration automatically sets hideFrom.tooltip = true for any field
// configuration override that has hideFrom.viz = true.
//
// The migration specifically targets field configuration overrides, including the special
// __systemRef override, and updates the hideFrom object to include tooltip: true whenever
// viz: true is found.
//
// Example transformation:
//
// Before migration:
//
// fieldConfig: {
// overrides: [{
// properties: [{
// id: "custom.hideFrom",
// value: { viz: true }
// }]
// }]
// }
//
// After migration:
//
// fieldConfig: {
// overrides: [{
// properties: [{
// id: "custom.hideFrom",
// value: { viz: true, tooltip: true }
// }]
// }]
// }
func V42(_ context.Context, dash map[string]interface{}) error {
dash["schemaVersion"] = int(42)
// Get panels from dashboard
panels, ok := dash["panels"].([]interface{})
if !ok {
return nil
}
// Process each panel
for _, panelInterface := range panels {
panel, ok := panelInterface.(map[string]interface{})
if !ok {
continue
}
migrateHideFromForPanel(panel)
}
return nil
}
// migrateHideFromForPanel processes a single panel and its nested panels
func migrateHideFromForPanel(panel map[string]interface{}) {
// Process the panel's field config
if fieldConfig, ok := panel["fieldConfig"].(map[string]interface{}); ok {
if overrides, ok := fieldConfig["overrides"].([]interface{}); ok {
for _, overrideInterface := range overrides {
override, ok := overrideInterface.(map[string]interface{})
if !ok {
continue
}
if properties, ok := override["properties"].([]interface{}); ok {
for _, propertyInterface := range properties {
property, ok := propertyInterface.(map[string]interface{})
if !ok {
continue
}
// Check if this is a custom.hideFrom property
if id, ok := property["id"].(string); ok && id == "custom.hideFrom" {
if value, ok := property["value"].(map[string]interface{}); ok {
// If viz is true, also set tooltip to true
if GetBoolValue(value, "viz") {
value["tooltip"] = true
}
}
}
}
}
}
}
}
// Process nested panels (for rows)
if nestedPanels, ok := panel["panels"].([]interface{}); ok {
for _, nestedPanelInterface := range nestedPanels {
if nestedPanel, ok := nestedPanelInterface.(map[string]interface{}); ok {
migrateHideFromForPanel(nestedPanel)
}
}
}
}
@@ -0,0 +1,422 @@
package schemaversion_test
import (
"testing"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
)
func TestV42(t *testing.T) {
tests := []migrationTestCase{
{
name: "hideFrom.viz = true should also set hideFrom.tooltip = true",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field 1",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"matcher": map[string]interface{}{
"id": "byName",
"options": "Field 1",
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
"tooltip": true,
},
},
},
},
},
},
},
},
},
},
{
name: "hideFrom.viz = false should not change",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": false,
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": false,
},
},
},
},
},
},
},
},
},
},
{
name: "multiple panels with hideFrom.viz = true",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
},
},
},
},
},
},
},
map[string]interface{}{
"id": 2,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
"legend": false,
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
"tooltip": true,
},
},
},
},
},
},
},
map[string]interface{}{
"id": 2,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
"legend": false,
"tooltip": true,
},
},
},
},
},
},
},
},
},
},
{
name: "panel without hideFrom property",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "unit",
"value": "short",
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "unit",
"value": "short",
},
},
},
},
},
},
},
},
},
{
name: "nested panels in rows should also be migrated",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"type": "row",
"title": "Row 1",
"panels": []interface{}{
map[string]interface{}{
"id": 2,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
},
},
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"type": "row",
"title": "Row 1",
"panels": []interface{}{
map[string]interface{}{
"id": 2,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"viz": true,
"tooltip": true,
},
},
},
},
},
},
},
},
},
},
},
},
{
name: "__systemRef override should also be migrated",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"__systemRef": "hideSeriesFrom",
"matcher": map[string]interface{}{
"id": "byNames",
"options": map[string]interface{}{
"mode": "exclude",
"names": []interface{}{"foo"},
"prefix": "All except:",
"readOnly": true,
},
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"legend": false,
"tooltip": false,
"viz": true,
},
},
},
},
},
},
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"fieldConfig": map[string]interface{}{
"overrides": []interface{}{
map[string]interface{}{
"__systemRef": "hideSeriesFrom",
"matcher": map[string]interface{}{
"id": "byNames",
"options": map[string]interface{}{
"mode": "exclude",
"names": []interface{}{"foo"},
"prefix": "All except:",
"readOnly": true,
},
},
"properties": []interface{}{
map[string]interface{}{
"id": "custom.hideFrom",
"value": map[string]interface{}{
"legend": false,
"tooltip": true,
"viz": true,
},
},
},
},
},
},
},
},
},
},
{
name: "dashboard without panels",
input: map[string]interface{}{
"title": "Test Dashboard",
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
},
},
{
name: "panel without fieldConfig",
input: map[string]interface{}{
"title": "Test Dashboard",
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
},
},
},
expected: map[string]interface{}{
"title": "Test Dashboard",
"schemaVersion": 42,
"panels": []interface{}{
map[string]interface{}{
"id": 1,
"title": "Panel 1",
},
},
},
},
}
runMigrationTests(t, tests, schemaversion.V42)
}
@@ -0,0 +1,161 @@
{
"title": "v42 Migration Test - HideFrom Tooltip",
"schemaVersion": 41,
"panels": [
{
"id": 1,
"title": "Panel with hideFrom.viz = true",
"type": "timeseries",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"viz": true
}
}
]
}
]
}
},
{
"id": 2,
"title": "Panel with multiple overrides",
"type": "graph",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"viz": true,
"legend": false
}
}
]
},
{
"matcher": {
"id": "__systemRef",
"options": "hiddenSeries"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"viz": true
}
}
]
}
]
}
},
{
"id": 3,
"type": "row",
"title": "Row with nested panels",
"collapsed": true,
"panels": [
{
"id": 4,
"title": "Nested panel with hideFrom",
"type": "stat",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": "/.*/"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"viz": true
}
}
]
}
]
}
},
{
"id": 5,
"title": "Panel without hideFrom",
"type": "table",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"properties": [
{
"id": "unit",
"value": "short"
}
]
}
]
}
}
]
},
{
"id": 6,
"title": "Panel with viz false (should not be modified)",
"type": "gauge",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"properties": [
{
"id": "custom.hideFrom",
"value": {
"viz": false,
"tooltip": false
}
}
]
}
]
}
},
{
"id": 7,
"title": "Panel with already set tooltip (should not be modified)",
"type": "barchart",
"fieldConfig": {
"defaults": {},
"overrides": [
{
"properties": [
{
"id": "custom.hideFrom",
"value": {
"viz": true,
"tooltip": false
}
}
]
}
]
}
}
]
}
@@ -125,7 +125,7 @@
}
],
"refresh": "1m",
"schemaVersion": 41,
"schemaVersion": 42,
"style": "dark",
"tags": [
"example-service",
@@ -3886,7 +3886,7 @@
}
],
"refresh": "1m",
"schemaVersion": 41,
"schemaVersion": 42,
"style": "dark",
"tags": [
"example-service",
@@ -3888,7 +3888,7 @@
}
],
"refresh": "1m",
"schemaVersion": 41,
"schemaVersion": 42,
"style": "dark",
"tags": [
"example-service",
@@ -2262,7 +2262,7 @@
}
],
"refresh": "5m",
"schemaVersion": 41,
"schemaVersion": 42,
"style": "dark",
"tags": [
"metrics",
@@ -62,7 +62,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -108,7 +108,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -938,7 +938,7 @@
}
],
"refresh": "30s",
"schemaVersion": 41,
"schemaVersion": 42,
"style": "dark",
"tags": [
"sample-monitoring"
@@ -482,6 +482,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V16 Grid Layout Migration Test Dashboard"
}
@@ -312,6 +312,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V17 MinSpan to MaxPerRow Migration Test Dashboard"
}
@@ -157,6 +157,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V18 Gauge Options Migration Test Dashboard"
}
@@ -201,6 +201,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V19 Panel Links Migration Test Dashboard"
}
@@ -215,7 +215,7 @@
}
],
"refresh": "5s",
"schemaVersion": 41,
"schemaVersion": 42,
"style": "dark",
"tags": [
"migration-test"
@@ -161,6 +161,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V21 Data Links Series to Field Migration Test Dashboard"
}
@@ -88,6 +88,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V22 Table Panel Styles Test"
}
@@ -30,7 +30,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -1369,5 +1369,5 @@
}
],
"refresh": "",
"schemaVersion": 41
}
"schemaVersion": 42
}
@@ -61,7 +61,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -68,5 +68,5 @@
}
],
"refresh": "",
"schemaVersion": 41
"schemaVersion": 42
}
@@ -64,7 +64,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -262,7 +262,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -535,7 +535,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": []
},
@@ -19,7 +19,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -368,6 +368,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V30 Value Mappings and Tooltip Options Migration Test Dashboard"
}
@@ -285,6 +285,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V31 LabelsToFields Merge Migration Test Dashboard"
}
@@ -124,7 +124,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -265,6 +265,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V33 Panel Datasource Name to Ref Test"
}
@@ -634,6 +634,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "CloudWatch Multiple Statistics Test Dashboard"
}
@@ -255,6 +255,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "X-Axis Visibility Test Dashboard"
}
@@ -322,7 +322,7 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"templating": {
"list": [
{
@@ -125,6 +125,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V37 Legend Normalization Test Dashboard"
}
@@ -218,6 +218,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V38 Table Migration Comprehensive Test Dashboard"
}
@@ -218,6 +218,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V38 Table Migration Test Dashboard"
}
@@ -154,6 +154,6 @@
}
],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"title": "V39 TimeSeriesTable Transformation Migration Test Dashboard"
}
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "1m",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -1,5 +1,5 @@
{
"schemaVersion": 41,
"schemaVersion": 42,
"timepicker": {
"refresh_intervals": [
"5s",
@@ -1,7 +1,7 @@
{
"panels": [],
"refresh": "",
"schemaVersion": 41,
"schemaVersion": 42,
"time": {
"from": "now-6h",
"to": "now"
@@ -0,0 +1,165 @@
{
"panels": [
{
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field1"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"tooltip": true,
"viz": true
}
}
]
}
]
},
"id": 1,
"title": "Panel with hideFrom.viz = true",
"type": "timeseries"
},
{
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Field2"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": true,
"viz": true
}
}
]
},
{
"matcher": {
"id": "__systemRef",
"options": "hiddenSeries"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"tooltip": true,
"viz": true
}
}
]
}
]
},
"id": 2,
"title": "Panel with multiple overrides",
"type": "graph"
},
{
"collapsed": true,
"id": 3,
"panels": [
{
"fieldConfig": {
"defaults": {},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": "/.*/"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"tooltip": true,
"viz": true
}
}
]
}
]
},
"id": 4,
"title": "Nested panel with hideFrom",
"type": "stat"
},
{
"fieldConfig": {
"defaults": {},
"overrides": [
{
"properties": [
{
"id": "unit",
"value": "short"
}
]
}
]
},
"id": 5,
"title": "Panel without hideFrom",
"type": "table"
}
],
"title": "Row with nested panels",
"type": "row"
},
{
"fieldConfig": {
"defaults": {},
"overrides": [
{
"properties": [
{
"id": "custom.hideFrom",
"value": {
"tooltip": false,
"viz": false
}
}
]
}
]
},
"id": 6,
"title": "Panel with viz false (should not be modified)",
"type": "gauge"
},
{
"fieldConfig": {
"defaults": {},
"overrides": [
{
"properties": [
{
"id": "custom.hideFrom",
"value": {
"tooltip": true,
"viz": true
}
}
]
}
]
},
"id": 7,
"title": "Panel with already set tooltip (should not be modified)",
"type": "barchart"
}
],
"schemaVersion": 42,
"title": "v42 Migration Test - HideFrom Tooltip"
}