diff --git a/.betterer.results b/.betterer.results index 5bc1468bc92..91a50fdcaff 100644 --- a/.betterer.results +++ b/.betterer.results @@ -3443,7 +3443,7 @@ exports[`better eslint`] = { "public/app/core/history/richHistoryLocalStorageUtils.ts:708464706": [ [59, 99, 3, "Unexpected any. Specify a different type.", "193409811"] ], - "public/app/core/logs_model.test.ts:47944319": [ + "public/app/core/logsModel.test.ts:342304192": [ [34, 32, 132, "Do not use any type assertions.", "3240026221"], [41, 9, 3, "Unexpected any. Specify a different type.", "193409811"], [46, 32, 250, "Do not use any type assertions.", "1056401323"], @@ -3467,7 +3467,7 @@ exports[`better eslint`] = { [1146, 14, 152, "Do not use any type assertions.", "1058688753"], [1146, 14, 117, "Do not use any type assertions.", "2244099206"] ], - "public/app/core/logs_model.ts:1903332011": [ + "public/app/core/logsModel.ts:1903332011": [ [113, 23, 3, "Unexpected any. Specify a different type.", "193409811"], [114, 20, 3, "Unexpected any. Specify a different type.", "193409811"], [461, 21, 196, "Do not use any type assertions.", "842163811"], @@ -5650,7 +5650,7 @@ exports[`better eslint`] = { "public/app/features/explore/ExploreQueryInspector.tsx:1760146357": [ [33, 62, 44, "Do not use any type assertions.", "290789231"] ], - "public/app/features/explore/Logs.tsx:4028397642": [ + "public/app/features/explore/Logs.tsx:3417011349": [ [78, 77, 3, "Unexpected any. Specify a different type.", "193409811"], [198, 68, 17, "Do not use any type assertions.", "1830153619"] ], @@ -6055,7 +6055,7 @@ exports[`better eslint`] = { [150, 23, 339, "Do not use any type assertions.", "1654092041"], [150, 23, 324, "Do not use any type assertions.", "1057375888"] ], - "public/app/features/inspector/InspectDataTab.tsx:3622788309": [ + "public/app/features/inspector/InspectDataTab.tsx:269212810": [ [172, 25, 3, "Unexpected any. Specify a different type.", "193409811"] ], "public/app/features/inspector/InspectErrorTab.tsx:1005725224": [ @@ -8334,7 +8334,7 @@ exports[`better eslint`] = { [1034, 11, 93, "Do not use any type assertions.", "2047151891"], [1037, 9, 3, "Unexpected any. Specify a different type.", "193409811"] ], - "public/app/plugins/datasource/elasticsearch/datasource.ts:1546021543": [ + "public/app/plugins/datasource/elasticsearch/datasource.ts:2846413304": [ [104, 55, 26, "Do not use any type assertions.", "3809377898"], [139, 16, 3, "Unexpected any. Specify a different type.", "193409811"], [171, 13, 3, "Unexpected any. Specify a different type.", "193409811"], @@ -9309,7 +9309,7 @@ exports[`better eslint`] = { [868, 15, 27, "Do not use any type assertions.", "2478144973"], [870, 9, 3, "Unexpected any. Specify a different type.", "193409811"] ], - "public/app/plugins/datasource/loki/datasource.ts:979697429": [ + "public/app/plugins/datasource/loki/datasource.ts:1935613834": [ [219, 23, 3, "Unexpected any. Specify a different type.", "193409811"], [355, 30, 3, "Unexpected any. Specify a different type.", "193409811"], [359, 30, 3, "Unexpected any. Specify a different type.", "193409811"], @@ -11792,8 +11792,8 @@ exports[`better eslint`] = { [100, 16, 495, "Do not use any type assertions.", "2521048876"], [100, 16, 477, "Do not use any type assertions.", "1400793553"] ], - "public/app/plugins/panel/logs/LogsPanel.tsx:4080293044": [ - [95, 41, 28, "Do not use any type assertions.", "3428864287"] + "public/app/plugins/panel/logs/LogsPanel.tsx:1594220909": [ + [93, 41, 28, "Do not use any type assertions.", "3428864287"] ], "public/app/plugins/panel/news/utils.test.ts:1075350837": [ [25, 24, 2416, "Do not use any type assertions.", "1190328332"] diff --git a/public/app/core/logs_model.test.ts b/public/app/core/logsModel.test.ts similarity index 99% rename from public/app/core/logs_model.test.ts rename to public/app/core/logsModel.test.ts index 4547b52f5eb..93b5405b3d0 100644 --- a/public/app/core/logs_model.test.ts +++ b/public/app/core/logsModel.test.ts @@ -28,7 +28,7 @@ import { LIMIT_LABEL, logSeriesToLogsModel, queryLogsVolume, -} from './logs_model'; +} from './logsModel'; describe('dedupLogRows()', () => { test('should return rows as is when dedup is set to none', () => { diff --git a/public/app/core/logs_model.ts b/public/app/core/logsModel.ts similarity index 100% rename from public/app/core/logs_model.ts rename to public/app/core/logsModel.ts diff --git a/public/app/features/explore/Logs.tsx b/public/app/features/explore/Logs.tsx index 5b34ad9c555..af348a1fd15 100644 --- a/public/app/features/explore/Logs.tsx +++ b/public/app/features/explore/Logs.tsx @@ -35,7 +35,7 @@ import { Themeable2, } from '@grafana/ui'; import { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider'; -import { dedupLogRows, filterLogLevels } from 'app/core/logs_model'; +import { dedupLogRows, filterLogLevels } from 'app/core/logsModel'; import store from 'app/core/store'; import { ExploreId } from 'app/types/explore'; diff --git a/public/app/features/explore/utils/decorators.ts b/public/app/features/explore/utils/decorators.ts index b2323eeffab..f8f4b46ebef 100644 --- a/public/app/features/explore/utils/decorators.ts +++ b/public/app/features/explore/utils/decorators.ts @@ -14,7 +14,7 @@ import { } from '@grafana/data'; import { config } from '@grafana/runtime'; -import { dataFrameToLogsModel } from '../../../core/logs_model'; +import { dataFrameToLogsModel } from '../../../core/logsModel'; import { refreshIntervalToSortOrder } from '../../../core/utils/explore'; import { ExplorePanelData } from '../../../types'; import { preProcessPanelData } from '../../query/state/runRequest'; diff --git a/public/app/features/inspector/InspectDataTab.tsx b/public/app/features/inspector/InspectDataTab.tsx index 046d4677888..4e6968fc8bd 100644 --- a/public/app/features/inspector/InspectDataTab.tsx +++ b/public/app/features/inspector/InspectDataTab.tsx @@ -22,7 +22,7 @@ import { selectors } from '@grafana/e2e-selectors'; import { reportInteraction } from '@grafana/runtime'; import { Button, Spinner, Table } from '@grafana/ui'; import { config } from 'app/core/config'; -import { dataFrameToLogsModel } from 'app/core/logs_model'; +import { dataFrameToLogsModel } from 'app/core/logsModel'; import { PanelModel } from 'app/features/dashboard/state'; import { GetDataOptions } from 'app/features/query/state/PanelQueryRunner'; import { transformToJaeger } from 'app/plugins/datasource/jaeger/responseTransform'; diff --git a/public/app/plugins/datasource/elasticsearch/datasource.ts b/public/app/plugins/datasource/elasticsearch/datasource.ts index b0dc90f9ffa..e52fca2064f 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.ts +++ b/public/app/plugins/datasource/elasticsearch/datasource.ts @@ -28,7 +28,7 @@ import { } from '@grafana/data'; import { BackendSrvRequest, getBackendSrv, getDataSourceSrv } from '@grafana/runtime'; import { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider'; -import { queryLogsVolume } from 'app/core/logs_model'; +import { queryLogsVolume } from 'app/core/logsModel'; import { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv'; import { ElasticsearchAnnotationsQueryEditor } from './components/QueryEditor/AnnotationQueryEditor'; diff --git a/public/app/plugins/datasource/loki/backendResultTransformer.ts b/public/app/plugins/datasource/loki/backendResultTransformer.ts index e1a9d8674c1..74300582270 100644 --- a/public/app/plugins/datasource/loki/backendResultTransformer.ts +++ b/public/app/plugins/datasource/loki/backendResultTransformer.ts @@ -28,7 +28,7 @@ function processStreamFrame( ): DataFrame { const custom: Record = { ...frame.meta?.custom, // keep the original meta.custom - // used by logs_model + // used by logsModel lokiQueryStatKey: 'Summary: total bytes processed', }; diff --git a/public/app/plugins/datasource/loki/datasource.ts b/public/app/plugins/datasource/loki/datasource.ts index 004979ff2df..4f2f2af7612 100644 --- a/public/app/plugins/datasource/loki/datasource.ts +++ b/public/app/plugins/datasource/loki/datasource.ts @@ -36,7 +36,7 @@ import { } from '@grafana/data'; import { FetchError, config, DataSourceWithBackend } from '@grafana/runtime'; import { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider'; -import { queryLogsVolume } from 'app/core/logs_model'; +import { queryLogsVolume } from 'app/core/logsModel'; import { convertToWebSocketUrl } from 'app/core/utils/explore'; import { getTimeSrv, TimeSrv } from 'app/features/dashboard/services/TimeSrv'; import { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv'; diff --git a/public/app/plugins/panel/logs/LogsPanel.tsx b/public/app/plugins/panel/logs/LogsPanel.tsx index f71bc05bdeb..c46511f5187 100644 --- a/public/app/plugins/panel/logs/LogsPanel.tsx +++ b/public/app/plugins/panel/logs/LogsPanel.tsx @@ -12,12 +12,10 @@ import { DataHoverEvent, } from '@grafana/data'; import { LogRows, CustomScrollbar, LogLabels, useStyles2, usePanelContext } from '@grafana/ui'; -import { dataFrameToLogsModel, dedupLogRows } from 'app/core/logs_model'; +import { dataFrameToLogsModel, dedupLogRows, COMMON_LABELS } from 'app/core/logsModel'; import { getFieldLinksForExplore } from 'app/features/explore/utils/links'; import { PanelDataErrorView } from 'app/features/panel/components/PanelDataErrorView'; -import { COMMON_LABELS } from '../../../core/logs_model'; - import { Options } from './types'; interface LogsPanelProps extends PanelProps {}