grafana/public/app/plugins/panel/table/__snapshots__/migrations.test.ts.snap
Jack Westbrook c14c7b6874
Table: migrate old-table config to new table config (#30142)
* feat(tablepanel): add migration button to old table panel config

* feat(tablepanel): migrate old table transformations

* feat(tablepanel): migrate old styles to config overrides

* feat(tablepanel): migrate catch all style override to panel defaults

* refactor(tablepanel): clean up typings

* refactor(tablepanel): base threshold as -Infinity

* feat(tablepanel): migrate align to new table config overrides

* feat(tablepanel): migrate links to new table overrides

* refactor(tabelpanel): clean up threshold migrations

* feat(tablepanel): introduce table transform to merge

* feat(tablepanel): add note informing user to manually update links with cell values
2021-01-15 13:06:40 +01:00

220 lines
4.8 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Table Migrations migrates styles to field config overrides and defaults 1`] = `
Object {
"fieldConfig": Object {
"defaults": Object {
"custom": Object {
"align": "right",
"displayMode": undefined,
},
"decimals": 2,
"displayName": "",
"unit": "short",
},
"overrides": Array [
Object {
"matcher": Object {
"id": "byName",
"options": "Time",
},
"properties": Array [
Object {
"id": "displayName",
"value": "Time",
},
Object {
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss",
},
Object {
"id": "custom.align",
"value": null,
},
],
},
Object {
"matcher": Object {
"id": "byName",
"options": "ColorCell",
},
"properties": Array [
Object {
"id": "unit",
"value": "currencyUSD",
},
Object {
"id": "decimals",
"value": 2,
},
Object {
"id": "custom.displayMode",
"value": "color-background",
},
Object {
"id": "custom.align",
"value": "left",
},
Object {
"id": "thresholds",
"value": Object {
"mode": "absolute",
"steps": Array [
Object {
"color": "rgba(245, 54, 54, 0.9)",
"value": -Infinity,
},
Object {
"color": "rgba(237, 129, 40, 0.89)",
"value": 5,
},
Object {
"color": "rgba(50, 172, 45, 0.97)",
"value": 10,
},
],
},
},
],
},
Object {
"matcher": Object {
"id": "byName",
"options": "ColorValue",
},
"properties": Array [
Object {
"id": "unit",
"value": "Bps",
},
Object {
"id": "decimals",
"value": 2,
},
Object {
"id": "links",
"value": Array [
Object {
"targetBlank": true,
"title": "",
"url": "http://www.grafana.com",
},
],
},
Object {
"id": "custom.displayMode",
"value": "color-text",
},
Object {
"id": "custom.align",
"value": null,
},
Object {
"id": "thresholds",
"value": Object {
"mode": "absolute",
"steps": Array [
Object {
"color": "rgba(245, 54, 54, 0.9)",
"value": -Infinity,
},
Object {
"color": "rgba(237, 129, 40, 0.89)",
"value": 5,
},
Object {
"color": "rgba(50, 172, 45, 0.97)",
"value": 10,
},
],
},
},
],
},
],
},
"transformations": Array [],
}
`;
exports[`Table Migrations migrates transform out to core transforms 1`] = `
Object {
"fieldConfig": Object {
"defaults": Object {
"custom": Object {},
},
"overrides": Array [],
},
"transformations": Array [
Object {
"id": "seriesToColumns",
"options": Object {
"reducers": Array [],
},
},
],
}
`;
exports[`Table Migrations migrates transform out to core transforms 2`] = `
Object {
"fieldConfig": Object {
"defaults": Object {
"custom": Object {},
},
"overrides": Array [],
},
"transformations": Array [
Object {
"id": "seriesToRows",
"options": Object {
"reducers": Array [],
},
},
],
}
`;
exports[`Table Migrations migrates transform out to core transforms 3`] = `
Object {
"fieldConfig": Object {
"defaults": Object {
"custom": Object {},
},
"overrides": Array [],
},
"transformations": Array [
Object {
"id": "reduce",
"options": Object {
"includeTimeField": false,
"reducers": Array [
"mean",
"max",
"last",
],
},
},
],
}
`;
exports[`Table Migrations migrates transform out to core transforms 4`] = `
Object {
"fieldConfig": Object {
"defaults": Object {
"custom": Object {},
},
"overrides": Array [],
},
"transformations": Array [
Object {
"id": "merge",
"options": Object {
"reducers": Array [],
},
},
],
}
`;