mirror of
https://github.com/grafana/grafana.git
synced 2025-09-20 15:52:53 +08:00
Chore: Rename influxql query builder and metadata request files (#69549)
* Move useUniqueId to a general place * Use new built-in useId hook * Rename query builder and metadata query * Move and rename the query builder tests
This commit is contained in:
@ -4229,10 +4229,7 @@ exports[`better eslint`] = {
|
|||||||
[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"]
|
||||||
],
|
],
|
||||||
"public/app/plugins/datasource/influxdb/migrations.ts:5381": [
|
"public/app/plugins/datasource/influxdb/influxql_query_builder.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/plugins/datasource/influxdb/query_builder.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"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||||
@ -4240,6 +4237,9 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "5"]
|
[0, 0, 0, "Do not use any type assertions.", "5"]
|
||||||
],
|
],
|
||||||
|
"public/app/plugins/datasource/influxdb/migrations.ts:5381": [
|
||||||
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
|
],
|
||||||
"public/app/plugins/datasource/influxdb/query_part.ts:5381": [
|
"public/app/plugins/datasource/influxdb/query_part.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"],
|
||||||
|
@ -3,12 +3,12 @@ import userEvent from '@testing-library/user-event';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import InfluxDatasource from '../../datasource';
|
import InfluxDatasource from '../../datasource';
|
||||||
import * as mockedMeta from '../../influxQLMetadataQuery';
|
import * as mockedMeta from '../../influxql_metadata_query';
|
||||||
import { InfluxQuery } from '../../types';
|
import { InfluxQuery } from '../../types';
|
||||||
|
|
||||||
import { Editor } from './Editor';
|
import { Editor } from './Editor';
|
||||||
|
|
||||||
jest.mock('../../influxQLMetadataQuery', () => {
|
jest.mock('../../influxql_metadata_query', () => {
|
||||||
return {
|
return {
|
||||||
__esModule: true,
|
__esModule: true,
|
||||||
getAllPolicies: jest.fn().mockReturnValueOnce(Promise.resolve(['default', 'autogen'])),
|
getAllPolicies: jest.fn().mockReturnValueOnce(Promise.resolve(['default', 'autogen'])),
|
||||||
|
@ -13,7 +13,7 @@ import {
|
|||||||
getFieldKeysForMeasurement,
|
getFieldKeysForMeasurement,
|
||||||
getTagKeysForMeasurementAndTags,
|
getTagKeysForMeasurementAndTags,
|
||||||
getTagValues,
|
getTagValues,
|
||||||
} from '../../influxQLMetadataQuery';
|
} from '../../influxql_metadata_query';
|
||||||
import {
|
import {
|
||||||
addNewGroupByPart,
|
addNewGroupByPart,
|
||||||
addNewSelectPart,
|
addNewSelectPart,
|
||||||
|
@ -32,12 +32,12 @@ import { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_sr
|
|||||||
import { AnnotationEditor } from './components/AnnotationEditor';
|
import { AnnotationEditor } from './components/AnnotationEditor';
|
||||||
import { FluxQueryEditor } from './components/FluxQueryEditor';
|
import { FluxQueryEditor } from './components/FluxQueryEditor';
|
||||||
import { BROWSER_MODE_DISABLED_MESSAGE } from './constants';
|
import { BROWSER_MODE_DISABLED_MESSAGE } from './constants';
|
||||||
import { getAllPolicies } from './influxQLMetadataQuery';
|
|
||||||
import InfluxQueryModel from './influx_query_model';
|
import InfluxQueryModel from './influx_query_model';
|
||||||
import InfluxSeries from './influx_series';
|
import InfluxSeries from './influx_series';
|
||||||
|
import { getAllPolicies } from './influxql_metadata_query';
|
||||||
|
import { InfluxQueryBuilder } from './influxql_query_builder';
|
||||||
import { prepareAnnotation } from './migrations';
|
import { prepareAnnotation } from './migrations';
|
||||||
import { buildRawQuery, replaceHardCodedRetentionPolicy } from './queryUtils';
|
import { buildRawQuery, replaceHardCodedRetentionPolicy } from './queryUtils';
|
||||||
import { InfluxQueryBuilder } from './query_builder';
|
|
||||||
import ResponseParser from './response_parser';
|
import ResponseParser from './response_parser';
|
||||||
import { InfluxOptions, InfluxQuery, InfluxVersion } from './types';
|
import { InfluxOptions, InfluxQuery, InfluxVersion } from './types';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import InfluxDatasource from './datasource';
|
import InfluxDatasource from './datasource';
|
||||||
|
import { InfluxQueryBuilder } from './influxql_query_builder';
|
||||||
import { replaceHardCodedRetentionPolicy } from './queryUtils';
|
import { replaceHardCodedRetentionPolicy } from './queryUtils';
|
||||||
import { InfluxQueryBuilder } from './query_builder';
|
|
||||||
import { InfluxQueryTag } from './types';
|
import { InfluxQueryTag } from './types';
|
||||||
|
|
||||||
const runExploreQuery = (
|
const runExploreQuery = (
|
@ -1,4 +1,4 @@
|
|||||||
import { InfluxQueryBuilder } from '../query_builder';
|
import { InfluxQueryBuilder } from './influxql_query_builder';
|
||||||
|
|
||||||
describe('InfluxQueryBuilder', () => {
|
describe('InfluxQueryBuilder', () => {
|
||||||
describe('when building explore queries', () => {
|
describe('when building explore queries', () => {
|
Reference in New Issue
Block a user