mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Improve typings and ignore Graph
(#75742)
* fix some types, ignore graph plugin as it'll be gone soon * update comments * more more more * undo renderer change * use Partial in the editor
This commit is contained in:
parent
d8357342a3
commit
171e2c1adb
@ -6782,11 +6782,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/query_hints.ts:5381": [
|
"public/app/plugins/datasource/prometheus/query_hints.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/QueryPattern.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/QueryPattern.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
@ -6814,9 +6810,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Styles should be written using objects.", "0"]
|
[0, 0, 0, "Styles should be written using objects.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/components/LabelParamEditor.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/components/LabelParamEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/components/MetricSelect.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/components/MetricSelect.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
@ -6836,9 +6830,6 @@ exports[`better eslint`] = {
|
|||||||
"public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilder.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilder.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilderContainer.tsx:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryCodeEditor.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryCodeEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"]
|
[0, 0, 0, "Styles should be written using objects.", "0"]
|
||||||
],
|
],
|
||||||
@ -6908,10 +6899,7 @@ exports[`better eslint`] = {
|
|||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/shared/OperationParamEditor.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/shared/OperationParamEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/querybuilder/shared/QueryBuilderHints.tsx:5381": [
|
"public/app/plugins/datasource/prometheus/querybuilder/shared/QueryBuilderHints.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
@ -6962,9 +6950,6 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "30"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "30"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "31"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "31"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/prometheus/result_transformer.ts:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/datasource/prometheus/types.ts:5381": [
|
"public/app/plugins/datasource/prometheus/types.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||||
@ -7037,38 +7022,35 @@ exports[`better eslint`] = {
|
|||||||
"public/app/plugins/datasource/tempo/datasource.ts:5381": [
|
"public/app/plugins/datasource/tempo/datasource.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
[0, 0, 0, "Do not use any type assertions.", "11"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "12"],
|
[0, 0, 0, "Do not use any type assertions.", "12"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "13"],
|
[0, 0, 0, "Do not use any type assertions.", "13"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "14"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "17"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/tempo/language_provider.ts:5381": [
|
"public/app/plugins/datasource/tempo/language_provider.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/tempo/resultTransformer.ts:5381": [
|
"public/app/plugins/datasource/tempo/resultTransformer.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
[0, 0, 0, "Do not use any type assertions.", "5"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/tempo/traceql/QueryEditor.tsx:5381": [
|
"public/app/plugins/datasource/tempo/traceql/QueryEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"]
|
[0, 0, 0, "Styles should be written using objects.", "0"]
|
||||||
@ -7101,8 +7083,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/zipkin/utils/transforms.ts:5381": [
|
"public/app/plugins/datasource/zipkin/utils/transforms.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/alertGroups/AlertGroup.tsx:5381": [
|
"public/app/plugins/panel/alertGroups/AlertGroup.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
@ -7185,11 +7166,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/barchart/bars.ts:5381": [
|
"public/app/plugins/panel/barchart/bars.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/barchart/module.tsx:5381": [
|
"public/app/plugins/panel/barchart/module.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
@ -7244,9 +7221,8 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Styles should be written using objects.", "1"]
|
[0, 0, 0, "Styles should be written using objects.", "1"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/canvas/editor/element/elementEditor.tsx:5381": [
|
"public/app/plugins/panel/canvas/editor/element/elementEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/canvas/editor/inline/InlineEdit.tsx:5381": [
|
"public/app/plugins/panel/canvas/editor/inline/InlineEdit.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
@ -7260,10 +7236,9 @@ exports[`better eslint`] = {
|
|||||||
"public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx:5381": [
|
"public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
[0, 0, 0, "Styles should be written using objects.", "4"]
|
||||||
[0, 0, 0, "Styles should be written using objects.", "5"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/canvas/editor/layer/TreeNavigationEditor.tsx:5381": [
|
"public/app/plugins/panel/canvas/editor/layer/TreeNavigationEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
@ -7279,9 +7254,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/canvas/globalStyles.ts:5381": [
|
"public/app/plugins/panel/canvas/globalStyles.ts:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"]
|
[0, 0, 0, "Styles should be written using objects.", "0"]
|
||||||
@ -7349,11 +7322,6 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Styles should be written using objects.", "4"],
|
[0, 0, 0, "Styles should be written using objects.", "4"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "5"]
|
[0, 0, 0, "Styles should be written using objects.", "5"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/geomap/components/MeasureVectorLayer.ts:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [
|
"public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||||
@ -7387,26 +7355,9 @@ exports[`better eslint`] = {
|
|||||||
"public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [
|
"public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/geomap/layers/data/dayNightLayer.tsx:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/geomap/layers/data/geojsonDynamic.ts:5381": [
|
"public/app/plugins/panel/geomap/layers/data/geojsonDynamic.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/geomap/layers/data/heatMap.tsx:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/geomap/layers/data/markersLayer.tsx:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/geomap/layers/data/photosLayer.tsx:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/geomap/layers/data/routeLayer.tsx:5381": [
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/geomap/layers/registry.ts:5381": [
|
"public/app/plugins/panel/geomap/layers/registry.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||||
@ -7463,356 +7414,13 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "1"]
|
[0, 0, 0, "Styles should be written using objects.", "1"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/graph/GraphContextMenuCtrl.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/GraphMigrations.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/Legend/Legend.tsx:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/Legend/LegendSeriesItem.tsx:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/align_yaxes.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/annotation_tooltip.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/axes_editor.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/data_processor.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/event_editor.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/event_manager.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/graph.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "21"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "23"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "24"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "25"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "26"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "27"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "28"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "29"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "30"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "31"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "32"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "33"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "34"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "35"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "36"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "37"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "38"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "39"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "40"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "41"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "42"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "43"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "44"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "45"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/graph_tooltip.d.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/graph_tooltip.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/histogram.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/jquery.flot.events.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "21"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "23"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "24"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "25"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "26"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "27"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "28"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "29"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "30"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "31"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "32"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "33"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "34"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "35"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "36"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "37"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "38"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "39"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "40"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "41"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "42"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "43"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "44"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "45"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "46"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "47"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/module.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "21"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/series_overrides_ctrl.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/data_processor.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/graph.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/graph_ctrl.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/graph_tooltip.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/histogram.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/series_override_ctrl.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/threshold_manager.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/specs/time_region_manager.test.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/threshold_manager.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/thresholds_form.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/time_region_manager.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/graph/time_regions_form.ts:5381": [
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/panel/heatmap/HeatmapPanel.tsx:5381": [
|
"public/app/plugins/panel/heatmap/HeatmapPanel.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
[0, 0, 0, "Styles should be written using objects.", "2"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
|
||||||
[0, 0, 0, "Styles should be written using objects.", "5"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/heatmap/migrations.ts:5381": [
|
"public/app/plugins/panel/heatmap/migrations.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/heatmap/module.tsx:5381": [
|
"public/app/plugins/panel/heatmap/module.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
@ -7854,28 +7462,17 @@ exports[`better eslint`] = {
|
|||||||
],
|
],
|
||||||
"public/app/plugins/panel/live/LiveChannelEditor.tsx:5381": [
|
"public/app/plugins/panel/live/LiveChannelEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Styles should be written using objects.", "1"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
|
||||||
[0, 0, 0, "Styles should be written using objects.", "10"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/live/LivePanel.tsx:5381": [
|
"public/app/plugins/panel/live/LivePanel.tsx:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
[0, 0, 0, "Styles should be written using objects.", "1"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
[0, 0, 0, "Styles should be written using objects.", "2"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "3"],
|
[0, 0, 0, "Styles should be written using objects.", "3"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "4"],
|
[0, 0, 0, "Styles should be written using objects.", "4"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "5"],
|
[0, 0, 0, "Styles should be written using objects.", "5"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "6"],
|
[0, 0, 0, "Styles should be written using objects.", "6"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "7"],
|
[0, 0, 0, "Styles should be written using objects.", "7"]
|
||||||
[0, 0, 0, "Styles should be written using objects.", "8"],
|
|
||||||
[0, 0, 0, "Styles should be written using objects.", "9"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/live/types.ts:5381": [
|
"public/app/plugins/panel/live/types.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
@ -7906,8 +7503,7 @@ exports[`better eslint`] = {
|
|||||||
],
|
],
|
||||||
"public/app/plugins/panel/nodeGraph/Legend.tsx:5381": [
|
"public/app/plugins/panel/nodeGraph/Legend.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
[0, 0, 0, "Styles should be written using objects.", "1"],
|
[0, 0, 0, "Styles should be written using objects.", "1"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/nodeGraph/Marker.tsx:5381": [
|
"public/app/plugins/panel/nodeGraph/Marker.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
@ -8014,9 +7610,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/table-old/module.ts:5381": [
|
"public/app/plugins/panel/table-old/module.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
@ -8037,12 +7631,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "18"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "21"],
|
|
||||||
[0, 0, 0, "Do not use any type assertions.", "22"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "23"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/table-old/renderer.ts:5381": [
|
"public/app/plugins/panel/table-old/renderer.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
@ -8051,17 +7640,13 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/table-old/transformers.ts:5381": [
|
"public/app/plugins/panel/table-old/transformers.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
@ -8072,9 +7657,7 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/table-old/types.ts:5381": [
|
"public/app/plugins/panel/table-old/types.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
@ -8099,14 +7682,12 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Styles should be written using objects.", "0"]
|
[0, 0, 0, "Styles should be written using objects.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/table/migrations.ts:5381": [
|
"public/app/plugins/panel/table/migrations.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/text/TextPanel.tsx:5381": [
|
"public/app/plugins/panel/text/TextPanel.tsx:5381": [
|
||||||
[0, 0, 0, "Styles should be written using objects.", "0"],
|
[0, 0, 0, "Styles should be written using objects.", "0"],
|
||||||
@ -8134,12 +7715,8 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
[0, 0, 0, "Do not use any type assertions.", "8"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "11"]
|
||||||
[0, 0, 0, "Do not use any type assertions.", "12"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"]
|
|
||||||
],
|
],
|
||||||
"public/app/plugins/panel/timeseries/plugins/ExemplarMarker.tsx:5381": [
|
"public/app/plugins/panel/timeseries/plugins/ExemplarMarker.tsx:5381": [
|
||||||
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"],
|
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"],
|
||||||
|
10
.betterer.ts
10
.betterer.ts
@ -4,11 +4,19 @@ import { ESLint, Linter } from 'eslint';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { glob } from 'glob';
|
import { glob } from 'glob';
|
||||||
|
|
||||||
|
// Why are we ignoring these?
|
||||||
|
// They're all deprecated/being removed soon so doesn't make sense to fix types
|
||||||
|
const eslintPathsToIgnore = [
|
||||||
|
'packages/grafana-e2e', // deprecated.
|
||||||
|
'public/app/angular', // will be removed in Grafana 11
|
||||||
|
'public/app/plugins/panel/graph', // will be removed alongside angular
|
||||||
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
'better eslint': () =>
|
'better eslint': () =>
|
||||||
countEslintErrors()
|
countEslintErrors()
|
||||||
.include('**/*.{ts,tsx}')
|
.include('**/*.{ts,tsx}')
|
||||||
.exclude(/public\/app\/angular|packages\/grafana-e2e/),
|
.exclude(new RegExp(eslintPathsToIgnore.join('|'))),
|
||||||
'no undocumented stories': () => countUndocumentedStories().include('**/!(*.internal).story.tsx'),
|
'no undocumented stories': () => countUndocumentedStories().include('**/!(*.internal).story.tsx'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ const rulesSource = {
|
|||||||
baseUrl: 'public/app/plugins/datasource/prometheus',
|
baseUrl: 'public/app/plugins/datasource/prometheus',
|
||||||
},
|
},
|
||||||
url: '/api/datasources/proxy/5',
|
url: '/api/datasources/proxy/5',
|
||||||
access: 'proxy' as 'proxy',
|
access: 'proxy' as const,
|
||||||
jsonData: {
|
jsonData: {
|
||||||
manageAlerts: true,
|
manageAlerts: true,
|
||||||
},
|
},
|
||||||
|
@ -25,7 +25,7 @@ export function getQueryHints(query: string, series?: any[], datasource?: Promet
|
|||||||
type: 'ADD_HISTOGRAM_QUANTILE',
|
type: 'ADD_HISTOGRAM_QUANTILE',
|
||||||
query,
|
query,
|
||||||
},
|
},
|
||||||
} as QueryFix,
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ export function getQueryHints(query: string, series?: any[], datasource?: Promet
|
|||||||
query,
|
query,
|
||||||
options: mappingForQuery,
|
options: mappingForQuery,
|
||||||
},
|
},
|
||||||
} as unknown as QueryFix,
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ export function getQueryHints(query: string, series?: any[], datasource?: Promet
|
|||||||
query: query,
|
query: query,
|
||||||
preventSubmit: true,
|
preventSubmit: true,
|
||||||
},
|
},
|
||||||
} as QueryFix,
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ export function LabelParamEditor({
|
|||||||
datasource,
|
datasource,
|
||||||
}: QueryBuilderOperationParamEditorProps) {
|
}: QueryBuilderOperationParamEditorProps) {
|
||||||
const [state, setState] = useState<{
|
const [state, setState] = useState<{
|
||||||
options?: Array<SelectableValue<any>>;
|
options?: SelectableValue[];
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
}>({});
|
}>({});
|
||||||
|
|
||||||
@ -42,10 +42,7 @@ export function LabelParamEditor({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadGroupByLabels(
|
async function loadGroupByLabels(query: PromVisualQuery, datasource: DataSourceApi): Promise<SelectableValue[]> {
|
||||||
query: PromVisualQuery,
|
|
||||||
datasource: DataSourceApi
|
|
||||||
): Promise<Array<SelectableValue<any>>> {
|
|
||||||
let labels: QueryBuilderLabelFilter[] = query.labels;
|
let labels: QueryBuilderLabelFilter[] = query.labels;
|
||||||
|
|
||||||
// This function is used by both Prometheus and Loki and this the only difference.
|
// This function is used by both Prometheus and Loki and this the only difference.
|
||||||
|
@ -82,9 +82,13 @@ export function PromQueryBuilderContainer(props: Props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const initialState: State = {
|
||||||
|
expr: '',
|
||||||
|
};
|
||||||
|
|
||||||
const stateSlice = createSlice({
|
const stateSlice = createSlice({
|
||||||
name: 'prom-builder-container',
|
name: 'prom-builder-container',
|
||||||
initialState: { expr: '' } as State,
|
initialState,
|
||||||
reducers: {
|
reducers: {
|
||||||
visualQueryChange: (state, action: PayloadAction<{ visQuery: PromVisualQuery; expr: string }>) => {
|
visualQueryChange: (state, action: PayloadAction<{ visQuery: PromVisualQuery; expr: string }>) => {
|
||||||
state.expr = action.payload.expr;
|
state.expr = action.payload.expr;
|
||||||
|
@ -53,7 +53,7 @@ function BoolInputParamEditor(props: QueryBuilderOperationParamEditorProps) {
|
|||||||
return (
|
return (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id={getOperationParamId(props.operationId, props.index)}
|
id={getOperationParamId(props.operationId, props.index)}
|
||||||
value={props.value as boolean}
|
value={Boolean(props.value)}
|
||||||
onChange={(evt) => props.onChange(props.index, evt.currentTarget.checked)}
|
onChange={(evt) => props.onChange(props.index, evt.currentTarget.checked)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -67,12 +67,12 @@ function SelectInputParamEditor({
|
|||||||
onChange,
|
onChange,
|
||||||
}: QueryBuilderOperationParamEditorProps) {
|
}: QueryBuilderOperationParamEditorProps) {
|
||||||
const styles = useStyles2(getStyles);
|
const styles = useStyles2(getStyles);
|
||||||
let selectOptions = paramDef.options as Array<SelectableValue<any>>;
|
let selectOptions = paramDef.options as SelectableValue[];
|
||||||
|
|
||||||
if (!selectOptions[0]?.label) {
|
if (!selectOptions[0]?.label) {
|
||||||
selectOptions = paramDef.options!.map((option) => ({
|
selectOptions = paramDef.options!.map((option) => ({
|
||||||
label: option.toString(),
|
label: option.toString(),
|
||||||
value: option as string,
|
value: option,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ import {
|
|||||||
formatLabels,
|
formatLabels,
|
||||||
getDisplayProcessor,
|
getDisplayProcessor,
|
||||||
Labels,
|
Labels,
|
||||||
PreferredVisualisationType,
|
|
||||||
ScopedVars,
|
ScopedVars,
|
||||||
TIME_SERIES_TIME_FIELD_NAME,
|
TIME_SERIES_TIME_FIELD_NAME,
|
||||||
TIME_SERIES_VALUE_FIELD_NAME,
|
TIME_SERIES_VALUE_FIELD_NAME,
|
||||||
@ -249,7 +248,7 @@ export function transformDFToTable(dfs: DataFrame[]): DataFrame[] {
|
|||||||
// Prometheus specific UI for instant queries
|
// Prometheus specific UI for instant queries
|
||||||
meta: {
|
meta: {
|
||||||
...dataFramesByRefId[refId][0].meta,
|
...dataFramesByRefId[refId][0].meta,
|
||||||
preferredVisualisationType: 'rawPrometheus' as PreferredVisualisationType,
|
preferredVisualisationType: 'rawPrometheus' as const,
|
||||||
},
|
},
|
||||||
length: timeField.values.length,
|
length: timeField.values.length,
|
||||||
};
|
};
|
||||||
|
@ -164,7 +164,7 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
|
|||||||
async labelNamesQuery(): Promise<Array<{ text: string }>> {
|
async labelNamesQuery(): Promise<Array<{ text: string }>> {
|
||||||
await this.languageProvider.fetchTags();
|
await this.languageProvider.fetchTags();
|
||||||
const tags = this.languageProvider.getAutocompleteTags();
|
const tags = this.languageProvider.getAutocompleteTags();
|
||||||
return tags.filter((tag) => tag !== undefined).map((tag) => ({ text: tag })) as Array<{ text: string }>;
|
return tags.filter((tag) => tag !== undefined).map((tag) => ({ text: tag }));
|
||||||
}
|
}
|
||||||
|
|
||||||
async labelValuesQuery(labelName?: string): Promise<Array<{ text: string }>> {
|
async labelValuesQuery(labelName?: string): Promise<Array<{ text: string }>> {
|
||||||
|
@ -85,7 +85,7 @@ export function createTableFrame(
|
|||||||
const line = values[i];
|
const line = values[i];
|
||||||
if (line) {
|
if (line) {
|
||||||
for (let traceRegex of traceRegexs) {
|
for (let traceRegex of traceRegexs) {
|
||||||
const match = (line as string).match(traceRegex);
|
const match = line.match(traceRegex);
|
||||||
if (match) {
|
if (match) {
|
||||||
const traceId = match[1];
|
const traceId = match[1];
|
||||||
const time = timeField ? timeField.values[i] : null;
|
const time = timeField ? timeField.values[i] : null;
|
||||||
@ -274,7 +274,7 @@ export function transformFromOTLP(
|
|||||||
tags: getSpanTags(span),
|
tags: getSpanTags(span),
|
||||||
logs: getLogs(span),
|
logs: getLogs(span),
|
||||||
references: getReferences(span),
|
references: getReferences(span),
|
||||||
} as TraceSpanRow);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import { identity } from 'lodash';
|
|
||||||
|
|
||||||
import { DataFrame, FieldType, MutableDataFrame, TraceKeyValuePair, TraceLog, TraceSpanRow } from '@grafana/data';
|
import { DataFrame, FieldType, MutableDataFrame, TraceKeyValuePair, TraceLog, TraceSpanRow } from '@grafana/data';
|
||||||
|
|
||||||
import { ZipkinAnnotation, ZipkinEndpoint, ZipkinSpan } from '../types';
|
import { ZipkinAnnotation, ZipkinEndpoint, ZipkinSpan } from '../types';
|
||||||
@ -116,7 +114,7 @@ function serviceTags(span: ZipkinSpan): TraceKeyValuePair[] {
|
|||||||
valueToTag('ipv6', endpoint.ipv6),
|
valueToTag('ipv6', endpoint.ipv6),
|
||||||
valueToTag('port', endpoint.port),
|
valueToTag('port', endpoint.port),
|
||||||
valueToTag('endpointType', span.localEndpoint ? 'local' : 'remote'),
|
valueToTag('endpointType', span.localEndpoint ? 'local' : 'remote'),
|
||||||
].filter(identity) as TraceKeyValuePair[];
|
].filter((item): item is TraceKeyValuePair => Boolean(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
function valueToTag<T>(key: string, value: T): TraceKeyValuePair<T> | undefined {
|
function valueToTag<T>(key: string, value: T): TraceKeyValuePair<T> | undefined {
|
||||||
|
@ -526,10 +526,9 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (isStacked) {
|
if (isStacked) {
|
||||||
//barsPctLayout = [null as any].concat(distrOne(u.data.length - 1, u.data[0].length));
|
barsPctLayout = [null, ...distrOne(u.data[0].length, u.data.length - 1)];
|
||||||
barsPctLayout = [null as any].concat(distrOne(u.data[0].length, u.data.length - 1));
|
|
||||||
} else {
|
} else {
|
||||||
barsPctLayout = [null as any].concat(distrTwo(u.data[0].length, u.data.length - 1));
|
barsPctLayout = [null, ...distrTwo(u.data[0].length, u.data.length - 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useMappedColors) {
|
if (useMappedColors) {
|
||||||
|
@ -36,10 +36,10 @@ export function getElementEditor(opts: CanvasEditorOptions): NestedPanelOptions<
|
|||||||
|
|
||||||
// Note that canvas editor writes things to the scene!
|
// Note that canvas editor writes things to the scene!
|
||||||
values: (parent: NestedValueAccess) => ({
|
values: (parent: NestedValueAccess) => ({
|
||||||
getValue: (path: string) => {
|
getValue: (path) => {
|
||||||
return lodashGet(opts.element.options, path);
|
return lodashGet(opts.element.options, path);
|
||||||
},
|
},
|
||||||
onChange: (path: string, value: any) => {
|
onChange: (path, value) => {
|
||||||
let options = opts.element.options;
|
let options = opts.element.options;
|
||||||
if (path === 'type' && value) {
|
if (path === 'type' && value) {
|
||||||
const layer = canvasElementRegistry.getIfExists(value);
|
const layer = canvasElementRegistry.getIfExists(value);
|
||||||
|
@ -37,7 +37,7 @@ export function InlineEditBody() {
|
|||||||
return new OptionsPaneCategoryDescriptor({ id: 'root', title: 'root' });
|
return new OptionsPaneCategoryDescriptor({ id: 'root', title: 'root' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const supplier = (builder: PanelOptionsEditorBuilder<any>, context: StandardEditorContext<any>) => {
|
const supplier = (builder: PanelOptionsEditorBuilder<any>) => {
|
||||||
if (activeTab === InlineEditTabs.ElementManagement) {
|
if (activeTab === InlineEditTabs.ElementManagement) {
|
||||||
builder.addNestedOptions(getLayerEditor(instanceState));
|
builder.addNestedOptions(getLayerEditor(instanceState));
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ export function getLayerEditor(opts: InstanceState): NestedPanelOptions<LayerEdi
|
|||||||
const { selected, scene } = opts;
|
const { selected, scene } = opts;
|
||||||
|
|
||||||
if (!scene.currentLayer) {
|
if (!scene.currentLayer) {
|
||||||
scene.currentLayer = scene.root as FrameState;
|
scene.currentLayer = scene.root;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected) {
|
if (selected) {
|
||||||
@ -47,10 +47,10 @@ export function getLayerEditor(opts: InstanceState): NestedPanelOptions<LayerEdi
|
|||||||
|
|
||||||
// Note that canvas editor writes things to the scene!
|
// Note that canvas editor writes things to the scene!
|
||||||
values: (parent: NestedValueAccess) => ({
|
values: (parent: NestedValueAccess) => ({
|
||||||
getValue: (path: string) => {
|
getValue: (path) => {
|
||||||
return lodashGet(options, path);
|
return lodashGet(options, path);
|
||||||
},
|
},
|
||||||
onChange: (path: string, value: any) => {
|
onChange: (path, value) => {
|
||||||
if (path === 'type' && value) {
|
if (path === 'type' && value) {
|
||||||
console.warn('unable to change layer type');
|
console.warn('unable to change layer type');
|
||||||
return;
|
return;
|
||||||
|
@ -174,21 +174,19 @@ export class MeasureVectorLayer extends VectorLayer<VectorSource> {
|
|||||||
|
|
||||||
styleFunction(feature: FeatureLike, segments: boolean, drawType?: string, tip?: string): Style[] {
|
styleFunction(feature: FeatureLike, segments: boolean, drawType?: string, tip?: string): Style[] {
|
||||||
const styles = [...this.shapeStyle];
|
const styles = [...this.shapeStyle];
|
||||||
const geometry = feature.getGeometry() as Geometry;
|
const geometry = feature.getGeometry();
|
||||||
if (geometry) {
|
if (geometry) {
|
||||||
const type = geometry.getType();
|
const type = geometry.getType();
|
||||||
let point: Point;
|
let point: Point;
|
||||||
let label: string;
|
let label: string;
|
||||||
let line: LineString;
|
let line: LineString;
|
||||||
if (!drawType || drawType === type) {
|
if (!drawType || drawType === type) {
|
||||||
if (type === 'Polygon') {
|
if (type === 'Polygon' && geometry instanceof Polygon) {
|
||||||
const poly = geometry as Polygon;
|
point = geometry.getInteriorPoint();
|
||||||
point = poly.getInteriorPoint();
|
|
||||||
label = this.getMapMeasurement(geometry);
|
label = this.getMapMeasurement(geometry);
|
||||||
line = new LineString(poly.getCoordinates()[0]);
|
line = new LineString(geometry.getCoordinates()[0]);
|
||||||
} else if (type === 'LineString') {
|
} else if (type === 'LineString' && geometry instanceof LineString) {
|
||||||
line = geometry as LineString;
|
point = new Point(geometry.getLastCoordinate());
|
||||||
point = new Point(line.getLastCoordinate());
|
|
||||||
label = this.getMapMeasurement(geometry);
|
label = this.getMapMeasurement(geometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,7 +210,12 @@ export class MeasureVectorLayer extends VectorLayer<VectorSource> {
|
|||||||
this.labelStyle.getText().setText(label);
|
this.labelStyle.getText().setText(label);
|
||||||
styles.push(this.labelStyle);
|
styles.push(this.labelStyle);
|
||||||
}
|
}
|
||||||
if (tip && type === 'Point' && !this.modify.getOverlay().getSource().getFeatures().length) {
|
if (
|
||||||
|
tip &&
|
||||||
|
type === 'Point' &&
|
||||||
|
geometry instanceof Point &&
|
||||||
|
!this.modify.getOverlay().getSource().getFeatures().length
|
||||||
|
) {
|
||||||
this.tipPoint = geometry;
|
this.tipPoint = geometry;
|
||||||
this.tipStyle.getText().setText(tip);
|
this.tipStyle.getText().setText(tip);
|
||||||
styles.push(this.tipStyle);
|
styles.push(this.tipStyle);
|
||||||
|
@ -163,7 +163,7 @@ export const dayNightLayer: MapLayerRegistryItem<DayNightConfig> = {
|
|||||||
if (false) {
|
if (false) {
|
||||||
subscriptions.add(
|
subscriptions.add(
|
||||||
eventBus.subscribe(DataHoverEvent, (event) => {
|
eventBus.subscribe(DataHoverEvent, (event) => {
|
||||||
const time = event.payload?.point?.time as number;
|
const time: number = event.payload?.point?.time;
|
||||||
if (time) {
|
if (time) {
|
||||||
const lineTime = new Date(time);
|
const lineTime = new Date(time);
|
||||||
const nightLinePoints = sourceLine.getCoordinates(lineTime.toString(), 'line');
|
const nightLinePoints = sourceLine.getCoordinates(lineTime.toString(), 'line');
|
||||||
|
@ -50,7 +50,7 @@ export const heatmapLayer: MapLayerRegistryItem<HeatmapConfig> = {
|
|||||||
*/
|
*/
|
||||||
create: async (map: Map, options: MapLayerOptions<HeatmapConfig>, eventBus: EventBus, theme: GrafanaTheme2) => {
|
create: async (map: Map, options: MapLayerOptions<HeatmapConfig>, eventBus: EventBus, theme: GrafanaTheme2) => {
|
||||||
const config = { ...defaultOptions, ...options.config };
|
const config = { ...defaultOptions, ...options.config };
|
||||||
|
|
||||||
const location = await getLocationMatchers(options.location);
|
const location = await getLocationMatchers(options.location);
|
||||||
const source = new FrameVectorSource<Point>(location);
|
const source = new FrameVectorSource<Point>(location);
|
||||||
const WEIGHT_KEY = "_weight";
|
const WEIGHT_KEY = "_weight";
|
||||||
@ -77,7 +77,7 @@ export const heatmapLayer: MapLayerRegistryItem<HeatmapConfig> = {
|
|||||||
|
|
||||||
const weightDim = getScaledDimension(frame, config.weight);
|
const weightDim = getScaledDimension(frame, config.weight);
|
||||||
source.forEachFeature( (f) => {
|
source.forEachFeature( (f) => {
|
||||||
const idx = f.get('rowIndex') as number;
|
const idx: number = f.get('rowIndex');
|
||||||
if(idx != null) {
|
if(idx != null) {
|
||||||
f.set(WEIGHT_KEY, weightDim.get(idx));
|
f.set(WEIGHT_KEY, weightDim.get(idx));
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ export const markersLayer: MapLayerRegistryItem<MarkersConfig> = {
|
|||||||
vectorLayer.setStyle(style.maker(style.base));
|
vectorLayer.setStyle(style.maker(style.base));
|
||||||
} else {
|
} else {
|
||||||
vectorLayer.setStyle((feature: FeatureLike) => {
|
vectorLayer.setStyle((feature: FeatureLike) => {
|
||||||
const idx = feature.get('rowIndex') as number;
|
const idx: number = feature.get('rowIndex');
|
||||||
const dims = style.dims;
|
const dims = style.dims;
|
||||||
if (!dims || !isNumber(idx)) {
|
if (!dims || !isNumber(idx)) {
|
||||||
return style.maker(style.base);
|
return style.maker(style.base);
|
||||||
|
@ -96,7 +96,7 @@ export const photosLayer: MapLayerRegistryItem<PhotoConfig> = {
|
|||||||
let src = unknownImage;
|
let src = unknownImage;
|
||||||
let idx = Infinity;
|
let idx = Infinity;
|
||||||
if (images.length > 0) {
|
if (images.length > 0) {
|
||||||
idx = feature.get('rowIndex') as number;
|
idx = feature.get('rowIndex');
|
||||||
src = images[idx] ?? unknownImage;
|
src = images[idx] ?? unknownImage;
|
||||||
}
|
}
|
||||||
const photoStyle = new Style({
|
const photoStyle = new Style({
|
||||||
|
@ -98,7 +98,7 @@ export const routeLayer: MapLayerRegistryItem<RouteConfig> = {
|
|||||||
vectorLayer.setStyle(styleBase);
|
vectorLayer.setStyle(styleBase);
|
||||||
} else {
|
} else {
|
||||||
vectorLayer.setStyle((feature: FeatureLike) => {
|
vectorLayer.setStyle((feature: FeatureLike) => {
|
||||||
const idx = feature.get('rowIndex') as number;
|
const idx: number = feature.get('rowIndex');
|
||||||
const dims = style.dims;
|
const dims = style.dims;
|
||||||
if (!dims || !isNumber(idx)) {
|
if (!dims || !isNumber(idx)) {
|
||||||
return routeStyle(style.base);
|
return routeStyle(style.base);
|
||||||
@ -223,8 +223,8 @@ export const routeLayer: MapLayerRegistryItem<RouteConfig> = {
|
|||||||
.subscribe({
|
.subscribe({
|
||||||
next: (event) => {
|
next: (event) => {
|
||||||
const feature = source.getFeatures()[0];
|
const feature = source.getFeatures()[0];
|
||||||
const frame = feature?.get('frame') as DataFrame;
|
const frame: DataFrame = feature?.get('frame');
|
||||||
const time = event.payload?.point?.time as number;
|
const time: number = event.payload?.point?.time;
|
||||||
if (frame && time) {
|
if (frame && time) {
|
||||||
const timeField = frame.fields.find((f) => f.name === TIME_SERIES_TIME_FIELD_NAME);
|
const timeField = frame.fields.find((f) => f.name === TIME_SERIES_TIME_FIELD_NAME);
|
||||||
if (timeField) {
|
if (timeField) {
|
||||||
|
@ -83,8 +83,8 @@ export const HeatmapPanel = ({
|
|||||||
}, [data.series, data.annotations, options, palette, theme, getFieldLinksSupplier, replaceVariables]);
|
}, [data.series, data.annotations, options, palette, theme, getFieldLinksSupplier, replaceVariables]);
|
||||||
|
|
||||||
const facets = useMemo(() => {
|
const facets = useMemo(() => {
|
||||||
let exemplarsXFacet: number[] = []; // "Time" field
|
let exemplarsXFacet: number[] | undefined = []; // "Time" field
|
||||||
let exemplarsyFacet: number[] = [];
|
let exemplarsyFacet: Array<number | undefined> = [];
|
||||||
|
|
||||||
const meta = readHeatmapRowsCustomMeta(info.heatmap);
|
const meta = readHeatmapRowsCustomMeta(info.heatmap);
|
||||||
if (info.exemplars?.length && meta.yMatchWithLabel) {
|
if (info.exemplars?.length && meta.yMatchWithLabel) {
|
||||||
@ -95,9 +95,9 @@ export const HeatmapPanel = ({
|
|||||||
|
|
||||||
if (hasLabeledY) {
|
if (hasLabeledY) {
|
||||||
let matchExemplarsBy = info.exemplars?.fields.find((field) => field.name === meta.yMatchWithLabel)!.values;
|
let matchExemplarsBy = info.exemplars?.fields.find((field) => field.name === meta.yMatchWithLabel)!.values;
|
||||||
exemplarsyFacet = matchExemplarsBy.map((label) => meta.yOrdinalLabel?.indexOf(label)) as number[];
|
exemplarsyFacet = matchExemplarsBy.map((label) => meta.yOrdinalLabel?.indexOf(label));
|
||||||
} else {
|
} else {
|
||||||
exemplarsyFacet = info.exemplars?.fields[1].values as number[]; // "Value" field
|
exemplarsyFacet = info.exemplars?.fields[1].values; // "Value" field
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,8 +134,7 @@ export const HeatmapPanel = ({
|
|||||||
dataRef.current = info;
|
dataRef.current = info;
|
||||||
|
|
||||||
const builder = useMemo(() => {
|
const builder = useMemo(() => {
|
||||||
const scaleConfig = dataRef.current?.heatmap?.fields[1].config?.custom
|
const scaleConfig: ScaleDistributionConfig = dataRef.current?.heatmap?.fields[1].config?.custom?.scaleDistribution;
|
||||||
?.scaleDistribution as ScaleDistributionConfig;
|
|
||||||
|
|
||||||
return prepConfig({
|
return prepConfig({
|
||||||
dataRef,
|
dataRef,
|
||||||
|
@ -129,7 +129,7 @@ export function angularToReactHeatmap(angular: any): { fieldConfig: FieldConfigS
|
|||||||
case 'spectrum': {
|
case 'spectrum': {
|
||||||
options.color.mode = HeatmapColorMode.Scheme;
|
options.color.mode = HeatmapColorMode.Scheme;
|
||||||
|
|
||||||
const current = color.colorScheme as string;
|
const current: string = color.colorScheme;
|
||||||
let scheme = colorSchemes.find((v) => v.name === current);
|
let scheme = colorSchemes.find((v) => v.name === current);
|
||||||
if (!scheme) {
|
if (!scheme) {
|
||||||
scheme = colorSchemes.find((v) => current.indexOf(v.name) >= 0);
|
scheme = colorSchemes.find((v) => current.indexOf(v.name) >= 0);
|
||||||
@ -168,7 +168,7 @@ function getHeatmapCellLayout(v?: string): HeatmapCellLayout {
|
|||||||
return HeatmapCellLayout.auto;
|
return HeatmapCellLayout.auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
function asNumber(v: any, defaultValue?: number): number | undefined {
|
function asNumber(v: unknown, defaultValue?: number): number | undefined {
|
||||||
if (v == null || v === '') {
|
if (v == null || v === '') {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import { config } from 'app/core/config';
|
|||||||
|
|
||||||
import { LivePanelOptions } from './types';
|
import { LivePanelOptions } from './types';
|
||||||
|
|
||||||
type Props = StandardEditorProps<LiveChannelAddress, any, LivePanelOptions>;
|
type Props = StandardEditorProps<Partial<LiveChannelAddress>, any, LivePanelOptions>;
|
||||||
|
|
||||||
const scopes: Array<SelectableValue<LiveChannelScope>> = [
|
const scopes: Array<SelectableValue<LiveChannelScope>> = [
|
||||||
{ label: 'Grafana', value: LiveChannelScope.Grafana, description: 'Core grafana live features' },
|
{ label: 'Grafana', value: LiveChannelScope.Grafana, description: 'Core grafana live features' },
|
||||||
@ -53,34 +53,27 @@ export class LiveChannelEditor extends PureComponent<Props, State> {
|
|||||||
if (v.value) {
|
if (v.value) {
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
scope: v.value,
|
scope: v.value,
|
||||||
namespace: undefined as unknown as string,
|
namespace: undefined,
|
||||||
path: undefined as unknown as string,
|
path: undefined,
|
||||||
} as LiveChannelAddress);
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onNamespaceChanged = (v: SelectableValue<string>) => {
|
onNamespaceChanged = (v: SelectableValue<string>) => {
|
||||||
const update = {
|
this.props.onChange({
|
||||||
scope: this.props.value?.scope,
|
scope: this.props.value?.scope,
|
||||||
path: undefined as unknown as string,
|
namespace: v.value,
|
||||||
} as LiveChannelAddress;
|
path: undefined,
|
||||||
|
});
|
||||||
if (v.value) {
|
|
||||||
update.namespace = v.value;
|
|
||||||
}
|
|
||||||
this.props.onChange(update);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onPathChanged = (v: SelectableValue<string>) => {
|
onPathChanged = (v: SelectableValue<string>) => {
|
||||||
const { value, onChange } = this.props;
|
const { value, onChange } = this.props;
|
||||||
const update = {
|
onChange({
|
||||||
scope: value.scope,
|
scope: value.scope,
|
||||||
namespace: value.namespace,
|
namespace: value.namespace,
|
||||||
} as LiveChannelAddress;
|
path: v.value,
|
||||||
if (v.value) {
|
});
|
||||||
update.path = v.value;
|
|
||||||
}
|
|
||||||
onChange(update);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -28,10 +28,10 @@ import { LivePanelOptions, MessageDisplayMode } from './types';
|
|||||||
interface Props extends PanelProps<LivePanelOptions> {}
|
interface Props extends PanelProps<LivePanelOptions> {}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
error?: any;
|
error?: unknown;
|
||||||
addr?: LiveChannelAddress;
|
addr?: LiveChannelAddress;
|
||||||
status?: LiveChannelStatusEvent;
|
status?: LiveChannelStatusEvent;
|
||||||
message?: any;
|
message?: unknown;
|
||||||
changed: number;
|
changed: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { identity } from 'lodash';
|
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
|
|
||||||
import { Field, FieldColorModeId, GrafanaTheme2 } from '@grafana/data';
|
import { Field, FieldColorModeId, GrafanaTheme2 } from '@grafana/data';
|
||||||
@ -74,7 +73,9 @@ function getColorLegendItems(nodes: NodeDatum[], theme: GrafanaTheme2): Array<Vi
|
|||||||
if (!nodes.length) {
|
if (!nodes.length) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const fields = [nodes[0].mainStat, nodes[0].secondaryStat].filter(identity) as Field[];
|
const fields = [nodes[0].mainStat, nodes[0].secondaryStat].filter((item): item is NonNullable<typeof item> =>
|
||||||
|
Boolean(item)
|
||||||
|
);
|
||||||
|
|
||||||
const node = nodes.find((n) => n.arcSections.length > 0);
|
const node = nodes.find((n) => n.arcSections.length > 0);
|
||||||
if (node) {
|
if (node) {
|
||||||
|
@ -58,7 +58,7 @@ export class TablePanelEditorCtrl {
|
|||||||
|
|
||||||
addColumn() {
|
addColumn() {
|
||||||
const columns = transformers[this.panel.transform].getColumns(this.panelCtrl.dataRaw);
|
const columns = transformers[this.panel.transform].getColumns(this.panelCtrl.dataRaw);
|
||||||
const column: any = find(columns, { text: this.addColumnSegment.value });
|
const column = find(columns, { text: this.addColumnSegment.value });
|
||||||
|
|
||||||
if (column) {
|
if (column) {
|
||||||
this.panel.columns.push(column);
|
this.panel.columns.push(column);
|
||||||
@ -94,7 +94,7 @@ export class TablePanelEditorCtrl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function tablePanelEditor(uiSegmentSrv: any) {
|
export function tablePanelEditor() {
|
||||||
'use strict';
|
'use strict';
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import { defaults } from 'lodash';
|
import { defaults } from 'lodash';
|
||||||
import { ComponentType } from 'react';
|
|
||||||
|
|
||||||
import { isTableData, PanelEvents, PanelPlugin, PanelProps } from '@grafana/data';
|
import { isTableData, PanelEvents, PanelPlugin } from '@grafana/data';
|
||||||
import config from 'app/core/config';
|
import config from 'app/core/config';
|
||||||
import { applyFilterFromTable } from 'app/features/variables/adhoc/actions';
|
import { applyFilterFromTable } from 'app/features/variables/adhoc/actions';
|
||||||
import { MetricsPanelCtrl } from 'app/plugins/sdk';
|
import { MetricsPanelCtrl } from 'app/plugins/sdk';
|
||||||
@ -23,7 +22,7 @@ export class TablePanelCtrl extends MetricsPanelCtrl {
|
|||||||
panelHasRowColorMode: boolean;
|
panelHasRowColorMode: boolean;
|
||||||
panelHasLinks: boolean;
|
panelHasLinks: boolean;
|
||||||
|
|
||||||
panelDefaults: any = {
|
panelDefaults = {
|
||||||
targets: [{}],
|
targets: [{}],
|
||||||
transform: 'timeseries_to_columns',
|
transform: 'timeseries_to_columns',
|
||||||
pageSize: null,
|
pageSize: null,
|
||||||
@ -243,7 +242,7 @@ export class TablePanelCtrl extends MetricsPanelCtrl {
|
|||||||
selector: '[data-link-tooltip]',
|
selector: '[data-link-tooltip]',
|
||||||
});
|
});
|
||||||
|
|
||||||
function addFilterClicked(e: any) {
|
function addFilterClicked(e: JQueryEventObject) {
|
||||||
const filterData = $(e.currentTarget).data();
|
const filterData = $(e.currentTarget).data();
|
||||||
const options = {
|
const options = {
|
||||||
datasource: panel.datasource,
|
datasource: panel.datasource,
|
||||||
@ -274,6 +273,6 @@ export class TablePanelCtrl extends MetricsPanelCtrl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const plugin = new PanelPlugin(null as unknown as ComponentType<PanelProps<any>>);
|
export const plugin = new PanelPlugin(null);
|
||||||
plugin.angularPanelCtrl = TablePanelCtrl;
|
plugin.angularPanelCtrl = TablePanelCtrl;
|
||||||
plugin.setNoPadding();
|
plugin.setNoPadding();
|
||||||
|
@ -21,7 +21,7 @@ import { ColumnRender, TableRenderModel, ColumnStyle } from './types';
|
|||||||
|
|
||||||
export class TableRenderer {
|
export class TableRenderer {
|
||||||
formatters: any[] = [];
|
formatters: any[] = [];
|
||||||
colorState: any;
|
colorState: Record<string, string | null> = {};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private panel: { styles: ColumnStyle[]; pageSize: number },
|
private panel: { styles: ColumnStyle[]; pageSize: number },
|
||||||
@ -136,7 +136,7 @@ export class TableRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (column.style.type === 'string') {
|
if (column.style.type === 'string') {
|
||||||
return (v: any): any => {
|
return (v: any) => {
|
||||||
if (isArray(v)) {
|
if (isArray(v)) {
|
||||||
v = v.join(', ');
|
v = v.join(', ');
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ export class TableRenderer {
|
|||||||
if (column.style.type === 'number') {
|
if (column.style.type === 'number') {
|
||||||
const valueFormatter = getValueFormat(column.unit || column.style.unit);
|
const valueFormatter = getValueFormat(column.unit || column.style.unit);
|
||||||
|
|
||||||
return (v: any): any => {
|
return (v: any) => {
|
||||||
if (v === null || v === void 0) {
|
if (v === null || v === void 0) {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ export class TableRenderer {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
setColorState(value: any, style: ColumnStyle) {
|
setColorState(value: unknown, style: ColumnStyle) {
|
||||||
if (!style.colorMode) {
|
if (!style.colorMode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ transformers['table'] = {
|
|||||||
const filteredData = tableDataFormatFilterer(data);
|
const filteredData = tableDataFormatFilterer(data);
|
||||||
|
|
||||||
// Track column indexes: name -> index
|
// Track column indexes: name -> index
|
||||||
const columnNames: any = {};
|
const columnNames: Record<string, number> = {};
|
||||||
|
|
||||||
// Union of all columns
|
// Union of all columns
|
||||||
const columns = filteredData.reduce((acc: Column[], series: TableData) => {
|
const columns = filteredData.reduce((acc: Column[], series: TableData) => {
|
||||||
@ -216,7 +216,7 @@ transformers['json'] = {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const names: any = {};
|
const names: Record<string, boolean> = {};
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
const series = data[i];
|
const series = data[i];
|
||||||
if (series.type !== 'docs') {
|
if (series.type !== 'docs') {
|
||||||
|
@ -21,7 +21,7 @@ import { Options } from './panelcfg.gen';
|
|||||||
*/
|
*/
|
||||||
export const tableMigrationHandler = (panel: PanelModel<Options>): Partial<Options> => {
|
export const tableMigrationHandler = (panel: PanelModel<Options>): Partial<Options> => {
|
||||||
// Table was saved as an angular table, lets just swap to the 'table-old' panel
|
// Table was saved as an angular table, lets just swap to the 'table-old' panel
|
||||||
if (!panel.pluginVersion && (panel as any).columns) {
|
if (!panel.pluginVersion && 'columns' in panel) {
|
||||||
console.log('Was angular table', panel);
|
console.log('Was angular table', panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -649,8 +649,7 @@ function fillY2DynamicValues(
|
|||||||
props: DynamicConfigValue[]
|
props: DynamicConfigValue[]
|
||||||
) {
|
) {
|
||||||
// The standard properties
|
// The standard properties
|
||||||
for (const key of Object.keys(y2)) {
|
for (const [key, value] of Object.entries(y2)) {
|
||||||
const value = (y2 as any)[key];
|
|
||||||
if (key !== 'custom' && value !== (y1 as any)[key]) {
|
if (key !== 'custom' && value !== (y1 as any)[key]) {
|
||||||
props.push({
|
props.push({
|
||||||
id: key,
|
id: key,
|
||||||
@ -662,8 +661,7 @@ function fillY2DynamicValues(
|
|||||||
// Add any custom property
|
// Add any custom property
|
||||||
const y1G = y1.custom ?? {};
|
const y1G = y1.custom ?? {};
|
||||||
const y2G = y2.custom ?? {};
|
const y2G = y2.custom ?? {};
|
||||||
for (const key of Object.keys(y2G)) {
|
for (const [key, value] of Object.entries(y2G)) {
|
||||||
const value = (y2G as any)[key];
|
|
||||||
if (value !== (y1G as any)[key]) {
|
if (value !== (y1G as any)[key]) {
|
||||||
props.push({
|
props.push({
|
||||||
id: `custom.${key}`,
|
id: `custom.${key}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user