Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Rename datasource file #430

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/__mocks__/OpenSearchDatasource.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataSourceInstanceSettings, DataSourcePluginMeta, PluginMetaInfo, PluginType } from '@grafana/data';
import { OpenSearchDatasource } from 'datasource';
import { OpenSearchDatasource } from 'opensearchDatasource';
import { Flavor, OpenSearchOptions } from 'types';

const info: PluginMetaInfo = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DataSourcePluginMeta } from '@grafana/data';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { OpenSearchDatasource } from 'datasource';
import { OpenSearchDatasource } from 'opensearchDatasource';
import React from 'react';
import { Flavor, LuceneQueryType, OpenSearchQuery } from 'types';
import { OpenSearchProvider } from '../OpenSearchQueryContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { SettingsEditor } from '.';
import { OpenSearchProvider } from '../../OpenSearchQueryContext';
import { OpenSearchDatasource } from '../../../../datasource';
import { OpenSearchDatasource } from '../../../../opensearchDatasource';
import { OpenSearchQuery } from '../../../../types';

describe('Settings Editor', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { renderHook } from '@testing-library/react-hooks';
import { render } from '@testing-library/react';
import { OpenSearchProvider, useDatasource, useQuery } from './OpenSearchQueryContext';
import { OpenSearchQuery } from '../../types';
import { OpenSearchDatasource } from '../../datasource';
import { OpenSearchDatasource } from '../../opensearchDatasource';

const query: OpenSearchQuery = {
refId: 'A',
Expand Down
2 changes: 1 addition & 1 deletion src/components/QueryEditor/OpenSearchQueryContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { createContext, PropsWithChildren, useContext } from 'react';
import { OpenSearchDatasource } from '../../datasource';
import { OpenSearchDatasource } from '../../opensearchDatasource';
import { combineReducers, useStatelessReducer, DispatchContext } from '../../hooks/useStatelessReducer';
import { OpenSearchQuery } from '../../types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PPLFormatEditor } from './';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { OpenSearchQuery, QueryType } from 'types';
import { OpenSearchDatasource } from 'datasource';
import { OpenSearchDatasource } from 'opensearchDatasource';
import { OpenSearchProvider } from '../OpenSearchQueryContext';

const pplLogsQuery: OpenSearchQuery = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/QueryEditor/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LuceneQueryType, OpenSearchQuery, QueryType } from '../../types';

import { render, screen } from '@testing-library/react';
import { QueryEditor } from '.';
import { OpenSearchDatasource } from '../../datasource';
import { OpenSearchDatasource } from '../../opensearchDatasource';

const mockDatasource = {
getSupportedQueryTypes: () => [QueryType.Lucene, QueryType.PPL],
Expand Down
2 changes: 1 addition & 1 deletion src/components/QueryEditor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { QueryEditorProps } from '@grafana/data';
import { OpenSearchDatasource } from '../../datasource';
import { OpenSearchDatasource } from '../../opensearchDatasource';
import { LuceneQueryType, OpenSearchOptions, OpenSearchQuery, QueryType } from '../../types';
import { OpenSearchProvider } from './OpenSearchQueryContext';
import { InlineField, InlineFieldRow, Input, QueryField } from '@grafana/ui';
Expand Down
2 changes: 1 addition & 1 deletion src/configuration/ConfigEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DataLinks } from './DataLinks';
import { config, getBackendSrv, getDataSourceSrv } from '@grafana/runtime';
import { coerceOptions, isValidOptions } from './utils';
import { SIGV4ConnectionConfig } from '@grafana/aws-sdk';
import { OpenSearchDatasource } from 'datasource';
import { OpenSearchDatasource } from 'opensearchDatasource';

export type Props = DataSourcePluginOptionsEditorProps<OpenSearchOptions>;
export const ConfigEditor = (props: Props) => {
Expand Down
2 changes: 1 addition & 1 deletion src/configuration/OpenSearchDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState } from 'react';
import { EventsWithValidation, regexValidation, LegacyForms, Button, Alert, VerticalGroup } from '@grafana/ui';
const { Select, Input, FormField, Switch } = LegacyForms;

Check warning on line 3 in src/configuration/OpenSearchDetails.tsx

View workflow job for this annotation

GitHub Actions / compatibilitycheck

'LegacyForms' is deprecated. Please use non-legacy versions of these components

Check warning on line 3 in src/configuration/OpenSearchDetails.tsx

View workflow job for this annotation

GitHub Actions / compatibilitycheck

'LegacyForms' is deprecated. Please use non-legacy versions of these components
import { Flavor, OpenSearchOptions } from '../types';
import { DataSourceSettings, SelectableValue } from '@grafana/data';
import { AVAILABLE_FLAVORS } from './utils';
import { gte, lt } from 'semver';
import { OpenSearchDatasource } from 'datasource';
import { OpenSearchDatasource } from 'opensearchDatasource';

const indexPatternTypes = [
{ label: 'No pattern', value: 'none' },
Expand Down
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataSourcePlugin } from '@grafana/data';
import { OpenSearchDatasource } from './datasource';
import { OpenSearchDatasource } from './opensearchDatasource';
import { ConfigEditor } from './configuration/ConfigEditor';
import { QueryEditor } from './components/QueryEditor';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
toUtc,
} from '@grafana/data';
import _ from 'lodash';
import { enhanceDataFrame, OpenSearchDatasource } from './datasource';
import { enhanceDataFrame, OpenSearchDatasource } from './opensearchDatasource';
import { PPLFormatType } from './components/QueryEditor/PPLFormatEditor/formats';
// import { backendSrv } from 'app/core/services/backend_srv'; // will use the version in __mocks__
// @ts-ignore
Expand Down
File renamed without changes.
Loading