From fb00a11b5fff9c6d6bc2fbcc5a6410d03581166c Mon Sep 17 00:00:00 2001 From: user10x <4950828+user10x@users.noreply.github.com> Date: Wed, 3 Aug 2022 03:33:13 -0700 Subject: [PATCH] rename table_model.ts => TableModel.ts (#51659) Co-authored-by: Ashley Harrison --- .betterer.results | 32 +++++++++---------- .../core/{table_model.ts => TableModel.ts} | 0 ...table_model.test.ts => TableModel.test.ts} | 2 +- .../features/explore/utils/decorators.test.ts | 2 +- public/app/features/plugins/plugin_loader.ts | 2 +- .../elasticsearch/elastic_response.ts | 2 +- .../datasource/influxdb/influx_series.ts | 2 +- .../datasource/influxdb/response_parser.ts | 2 +- .../panel/table-old/specs/renderer.test.ts | 2 +- .../plugins/panel/table-old/transformers.ts | 2 +- public/app/plugins/panel/table-old/types.ts | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) rename public/app/core/{table_model.ts => TableModel.ts} (100%) rename public/app/core/specs/{table_model.test.ts => TableModel.test.ts} (99%) diff --git a/.betterer.results b/.betterer.results index 46861281fda..d6b48d90e22 100644 --- a/.betterer.results +++ b/.betterer.results @@ -2813,6 +2813,19 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "8"], [0, 0, 0, "Unexpected any. Specify a different type.", "9"] ], + "public/app/core/TableModel.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, "Do not use any type assertions.", "7"], + [0, 0, 0, "Do not use any type assertions.", "8"], + [0, 0, 0, "Unexpected any. Specify a different type.", "9"], + [0, 0, 0, "Do not use any type assertions.", "10"] + ], "public/app/core/components/ColorScale/ColorScale.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -3274,6 +3287,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"] ], + "public/app/core/specs/TableModel.test.ts:5381": [ + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] + ], "public/app/core/specs/backend_srv.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], @@ -3300,9 +3316,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], - "public/app/core/specs/table_model.test.ts:5381": [ - [0, 0, 0, "Unexpected any. Specify a different type.", "0"] - ], "public/app/core/specs/ticks.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -3318,19 +3331,6 @@ exports[`better eslint`] = { "public/app/core/store.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/core/table_model.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, "Do not use any type assertions.", "7"], - [0, 0, 0, "Do not use any type assertions.", "8"], - [0, 0, 0, "Unexpected any. Specify a different type.", "9"], - [0, 0, 0, "Do not use any type assertions.", "10"] - ], "public/app/core/time_series2.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], diff --git a/public/app/core/table_model.ts b/public/app/core/TableModel.ts similarity index 100% rename from public/app/core/table_model.ts rename to public/app/core/TableModel.ts diff --git a/public/app/core/specs/table_model.test.ts b/public/app/core/specs/TableModel.test.ts similarity index 99% rename from public/app/core/specs/table_model.test.ts rename to public/app/core/specs/TableModel.test.ts index 94f8085bb5a..c374b1c8742 100644 --- a/public/app/core/specs/table_model.test.ts +++ b/public/app/core/specs/TableModel.test.ts @@ -1,4 +1,4 @@ -import TableModel, { mergeTablesIntoModel } from 'app/core/table_model'; +import TableModel, { mergeTablesIntoModel } from 'app/core/TableModel'; describe('when sorting table desc', () => { let table: TableModel; diff --git a/public/app/features/explore/utils/decorators.test.ts b/public/app/features/explore/utils/decorators.test.ts index 5387767b6bb..01480bd2d5e 100644 --- a/public/app/features/explore/utils/decorators.test.ts +++ b/public/app/features/explore/utils/decorators.test.ts @@ -12,7 +12,7 @@ import { toDataFrame, } from '@grafana/data'; import { GraphDrawStyle, StackingMode } from '@grafana/schema'; -import TableModel from 'app/core/table_model'; +import TableModel from 'app/core/TableModel'; import { ExplorePanelData } from 'app/types'; import { diff --git a/public/app/features/plugins/plugin_loader.ts b/public/app/features/plugins/plugin_loader.ts index 1c296afe5c8..50615f1aedf 100644 --- a/public/app/features/plugins/plugin_loader.ts +++ b/public/app/features/plugins/plugin_loader.ts @@ -18,11 +18,11 @@ import * as grafanaData from '@grafana/data'; import * as grafanaRuntime from '@grafana/runtime'; import slateReact from '@grafana/slate-react'; import * as grafanaUIraw from '@grafana/ui'; +import TableModel from 'app/core/TableModel'; import config from 'app/core/config'; import { appEvents, contextSrv } from 'app/core/core'; import { BackendSrv, getBackendSrv } from 'app/core/services/backend_srv'; import impressionSrv from 'app/core/services/impression_srv'; -import TableModel from 'app/core/table_model'; import TimeSeries from 'app/core/time_series2'; import * as flatten from 'app/core/utils/flatten'; import kbn from 'app/core/utils/kbn'; diff --git a/public/app/plugins/datasource/elasticsearch/elastic_response.ts b/public/app/plugins/datasource/elasticsearch/elastic_response.ts index 6d2952e35e5..d21f38ca4fb 100644 --- a/public/app/plugins/datasource/elasticsearch/elastic_response.ts +++ b/public/app/plugins/datasource/elasticsearch/elastic_response.ts @@ -8,7 +8,7 @@ import { MutableDataFrame, PreferredVisualisationType, } from '@grafana/data'; -import TableModel from 'app/core/table_model'; +import TableModel from 'app/core/TableModel'; import flatten from 'app/core/utils/flatten'; import { diff --git a/public/app/plugins/datasource/influxdb/influx_series.ts b/public/app/plugins/datasource/influxdb/influx_series.ts index 2776592155b..fa4b0cd41ee 100644 --- a/public/app/plugins/datasource/influxdb/influx_series.ts +++ b/public/app/plugins/datasource/influxdb/influx_series.ts @@ -1,7 +1,7 @@ import { each, map, includes, flatten, keys } from 'lodash'; import { FieldType, QueryResultMeta, TimeSeries, TableData } from '@grafana/data'; -import TableModel from 'app/core/table_model'; +import TableModel from 'app/core/TableModel'; export default class InfluxSeries { refId?: string; diff --git a/public/app/plugins/datasource/influxdb/response_parser.ts b/public/app/plugins/datasource/influxdb/response_parser.ts index 459da8b441e..3a49fe667a3 100644 --- a/public/app/plugins/datasource/influxdb/response_parser.ts +++ b/public/app/plugins/datasource/influxdb/response_parser.ts @@ -2,7 +2,7 @@ import { each, flatten, groupBy, isArray } from 'lodash'; import { AnnotationEvent, DataFrame, DataQuery, FieldType, QueryResultMeta } from '@grafana/data'; import { toDataQueryResponse } from '@grafana/runtime'; -import TableModel from 'app/core/table_model'; +import TableModel from 'app/core/TableModel'; import { InfluxQuery } from './types'; diff --git a/public/app/plugins/panel/table-old/specs/renderer.test.ts b/public/app/plugins/panel/table-old/specs/renderer.test.ts index 0b9120e037f..e7e18baf4f5 100644 --- a/public/app/plugins/panel/table-old/specs/renderer.test.ts +++ b/public/app/plugins/panel/table-old/specs/renderer.test.ts @@ -2,7 +2,7 @@ import { each } from 'lodash'; import { ScopedVars, TimeZone } from '@grafana/data'; import { getTheme } from '@grafana/ui'; -import TableModel from 'app/core/table_model'; +import TableModel from 'app/core/TableModel'; import { TableRenderer } from '../renderer'; import { ColumnRender } from '../types'; diff --git a/public/app/plugins/panel/table-old/transformers.ts b/public/app/plugins/panel/table-old/transformers.ts index c4b50796c4e..5411ce4705d 100644 --- a/public/app/plugins/panel/table-old/transformers.ts +++ b/public/app/plugins/panel/table-old/transformers.ts @@ -1,7 +1,7 @@ import { findIndex, isObject, map } from 'lodash'; import { Column, TableData } from '@grafana/data'; -import TableModel, { mergeTablesIntoModel } from 'app/core/table_model'; +import TableModel, { mergeTablesIntoModel } from 'app/core/TableModel'; import TimeSeries from 'app/core/time_series2'; import flatten from 'app/core/utils/flatten'; diff --git a/public/app/plugins/panel/table-old/types.ts b/public/app/plugins/panel/table-old/types.ts index a98f04d5837..8540af3637e 100644 --- a/public/app/plugins/panel/table-old/types.ts +++ b/public/app/plugins/panel/table-old/types.ts @@ -1,5 +1,5 @@ import { Column } from '@grafana/data'; -import TableModel from 'app/core/table_model'; +import TableModel from 'app/core/TableModel'; export interface TableTransform { description: string;