From fcc2fa7039a87e65b11ce8383068eb172f092c41 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:48:10 -0700 Subject: [PATCH 01/12] [Discover-next] add datasource container (#7157) (#7164) * [Discover-next] add datasource container Enables the editor to let plugins to mount their own data source component to the data source container. Issue partially resolved: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/7129 * Changeset file for PR #7157 created/updated --------- (cherry picked from commit e1c5cfd102e324198b871ebb5044d079e81ca3cd) Signed-off-by: Kawika Avilla Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7157.yml | 2 ++ .../public/ui/query_editor/_query_editor.scss | 16 +++++++++ .../public/ui/query_editor/query_editor.tsx | 34 ++++++++++++------- .../ui/query_editor/query_editor_top_row.tsx | 4 ++- .../ui/search_bar/create_search_bar.tsx | 9 +++++ .../data/public/ui/search_bar/search_bar.tsx | 2 ++ src/plugins/data/public/ui/types.ts | 4 ++- src/plugins/data/public/ui/ui_service.ts | 7 ++++ 8 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 changelogs/fragments/7157.yml diff --git a/changelogs/fragments/7157.yml b/changelogs/fragments/7157.yml new file mode 100644 index 000000000000..e7b25524e961 --- /dev/null +++ b/changelogs/fragments/7157.yml @@ -0,0 +1,2 @@ +feat: +- Query editor and dataframes datasources container ([#7157](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7157)) \ No newline at end of file diff --git a/src/plugins/data/public/ui/query_editor/_query_editor.scss b/src/plugins/data/public/ui/query_editor/_query_editor.scss index fafb85a1bea5..80ddd42fede5 100644 --- a/src/plugins/data/public/ui/query_editor/_query_editor.scss +++ b/src/plugins/data/public/ui/query_editor/_query_editor.scss @@ -24,6 +24,22 @@ } .osdQueryEditor__dataSourceWrapper { + .dataSourceSelect { + border-bottom: $euiBorderThin !important; + + :first-child { + box-shadow: none !important; + height: 100%; + border-radius: 0; + } + + div:is([class$="--group"]) { + padding: 0 !important; + } + } +} + +.osdQueryEditor__dataSetWrapper { .dataExplorerDSSelect { border-bottom: $euiBorderThin !important; diff --git a/src/plugins/data/public/ui/query_editor/query_editor.tsx b/src/plugins/data/public/ui/query_editor/query_editor.tsx index a12cb3052f53..19c4c527038c 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor.tsx @@ -25,6 +25,7 @@ export interface QueryEditorProps { indexPatterns: Array; dataSource?: DataSource; query: Query; + dataSourceContainerRef?: React.RefCallback; containerRef?: React.RefCallback; settings: Settings; disableAutoFocus?: boolean; @@ -54,6 +55,7 @@ interface Props extends QueryEditorProps { interface State { isDataSourcesVisible: boolean; + isDataSetsVisible: boolean; isSuggestionsVisible: boolean; index: number | null; suggestions: QuerySuggestion[]; @@ -77,7 +79,8 @@ const KEY_CODES = { // eslint-disable-next-line import/no-default-export export default class QueryEditorUI extends Component { public state: State = { - isDataSourcesVisible: true, + isDataSourcesVisible: false, + isDataSetsVisible: true, isSuggestionsVisible: false, index: null, suggestions: [], @@ -212,9 +215,9 @@ export default class QueryEditorUI extends Component { : undefined; this.onChange(newQuery, dateRange); this.onSubmit(newQuery, dateRange); + this.setState({ isDataSetsVisible: enhancement?.searchBar?.showDataSetsSelector ?? true }); this.setState({ isDataSourcesVisible: enhancement?.searchBar?.showDataSourcesSelector ?? true, - isDataSetsVisible: enhancement?.searchBar?.showDataSetsSelector ?? true, }); }; @@ -228,15 +231,19 @@ export default class QueryEditorUI extends Component { private initDataSourcesVisibility = () => { if (this.componentIsUnmounting) return; - return this.props.settings.getQueryEnhancements(this.props.query.language)?.searchBar - ?.showDataSourcesSelector; + const isDataSourcesVisible = + this.props.settings.getQueryEnhancements(this.props.query.language)?.searchBar + ?.showDataSourcesSelector ?? true; + this.setState({ isDataSourcesVisible }); }; private initDataSetsVisibility = () => { if (this.componentIsUnmounting) return; - return this.props.settings.getQueryEnhancements(this.props.query.language)?.searchBar - ?.showDataSetsSelector; + const isDataSetsVisible = + this.props.settings.getQueryEnhancements(this.props.query.language)?.searchBar + ?.showDataSetsSelector ?? true; + this.setState({ isDataSetsVisible }); }; public onMouseEnterSuggestion = (index: number) => { @@ -253,10 +260,8 @@ export default class QueryEditorUI extends Component { this.initPersistedLog(); // this.fetchIndexPatterns().then(this.updateSuggestions); - this.setState({ - isDataSourcesVisible: this.initDataSourcesVisibility() || true, - isDataSetsVisible: this.initDataSetsVisibility() || true, - }); + this.initDataSourcesVisibility(); + this.initDataSetsVisibility(); } public componentDidUpdate(prevProps: Props) { @@ -291,6 +296,11 @@ export default class QueryEditorUI extends Component { {this.props.prepend} + {this.state.isDataSourcesVisible && ( + +
+ + )} { appName={this.services.appName} /> - {this.state.isDataSourcesVisible && ( - + {this.state.isDataSetsVisible && ( +
)} diff --git a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx index be75c44ece60..3ea715418ab1 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx @@ -14,7 +14,7 @@ import { } from '@elastic/eui'; import classNames from 'classnames'; import { compact, isEqual } from 'lodash'; -import React, { useRef, useState } from 'react'; +import React, { useState } from 'react'; import { DataSource, IDataPluginServices, @@ -38,6 +38,7 @@ const QueryEditor = withOpenSearchDashboards(QueryEditorUI); // @internal export interface QueryEditorTopRowProps { query?: Query; + dataSourceContainerRef?: React.RefCallback; containerRef?: React.RefCallback; settings?: Settings; onSubmit: (payload: { dateRange: TimeRange; query?: Query }) => void; @@ -234,6 +235,7 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { dataSource={props.dataSource} prepend={props.prepend} query={parsedQuery} + dataSourceContainerRef={props.dataSourceContainerRef} containerRef={props.containerRef} settings={props.settings!} screenTitle={props.screenTitle} diff --git a/src/plugins/data/public/ui/search_bar/create_search_bar.tsx b/src/plugins/data/public/ui/search_bar/create_search_bar.tsx index 9baeab489d4b..244f4296216c 100644 --- a/src/plugins/data/public/ui/search_bar/create_search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/create_search_bar.tsx @@ -48,6 +48,7 @@ interface StatefulSearchBarDeps { data: Omit; storage: IStorageWrapper; settings: Settings; + setDataSourceContainerRef: (ref: HTMLDivElement | null) => void; setContainerRef: (ref: HTMLDivElement | null) => void; } @@ -138,6 +139,7 @@ export function createSearchBar({ storage, data, settings, + setDataSourceContainerRef, setContainerRef, }: StatefulSearchBarDeps) { // App name should come from the core application service. @@ -174,6 +176,12 @@ export function createSearchBar({ notifications: core.notifications, }); + const dataSourceContainerRef = useCallback((node) => { + if (node) { + setDataSourceContainerRef(node); + } + }, []); + const containerRef = useCallback((node) => { if (node) { setContainerRef(node); @@ -220,6 +228,7 @@ export function createSearchBar({ filters={filters} query={query} settings={settings} + dataSourceContainerRef={dataSourceContainerRef} containerRef={containerRef} onFiltersUpdated={defaultFiltersUpdated(data.query)} onRefreshChange={defaultOnRefreshChange(data.query)} diff --git a/src/plugins/data/public/ui/search_bar/search_bar.tsx b/src/plugins/data/public/ui/search_bar/search_bar.tsx index 54e39fcb0b8d..11914f134443 100644 --- a/src/plugins/data/public/ui/search_bar/search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/search_bar.tsx @@ -80,6 +80,7 @@ export interface SearchBarOwnProps { // Query bar - should be in SearchBarInjectedDeps query?: Query; settings?: Settings; + dataSourceContainerRef?: React.RefCallback; containerRef?: React.RefCallback; // Show when user has privileges to save showSaveQuery?: boolean; @@ -490,6 +491,7 @@ class SearchBarUI extends Component { queryEditor = ( ; searchBar?: { - showDataSourceSelector?: boolean; + showDataSetsSelector?: boolean; + showDataSourcesSelector?: boolean; showQueryInput?: boolean; showFilterBar?: boolean; showDatePicker?: boolean; @@ -66,5 +67,6 @@ export interface IUiStart { SearchBar: React.ComponentType; SuggestionsComponent: React.ComponentType; Settings: Settings; + dataSourceContainer$: Observable; container$: Observable; } diff --git a/src/plugins/data/public/ui/ui_service.ts b/src/plugins/data/public/ui/ui_service.ts index e2dcae737acc..243490dc8201 100644 --- a/src/plugins/data/public/ui/ui_service.ts +++ b/src/plugins/data/public/ui/ui_service.ts @@ -29,6 +29,7 @@ export class UiService implements Plugin { enhancementsConfig: ConfigSchema['enhancements']; private queryEnhancements: Map = new Map(); private queryEditorExtensionMap: Record = {}; + private dataSourceContainer$ = new BehaviorSubject(null); private container$ = new BehaviorSubject(null); constructor(initializerContext: PluginInitializerContext) { @@ -62,6 +63,10 @@ export class UiService implements Plugin { queryEditorExtensionMap: this.queryEditorExtensionMap, }); + const setDataSourceContainerRef = (ref: HTMLDivElement | null) => { + this.dataSourceContainer$.next(ref); + }; + const setContainerRef = (ref: HTMLDivElement | null) => { this.container$.next(ref); }; @@ -71,6 +76,7 @@ export class UiService implements Plugin { data: dataServices, storage, settings: Settings, + setDataSourceContainerRef, setContainerRef, }); @@ -79,6 +85,7 @@ export class UiService implements Plugin { SearchBar, SuggestionsComponent, Settings, + dataSourceContainer$: this.dataSourceContainer$, container$: this.container$, }; } From b597a9997b21fafabd30067f23ec4be341bafa5d Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:50:37 -0700 Subject: [PATCH 02/12] [Discover-next] (QueryEditorExtensions) change isEnabled to an observable (#7183) (#7193) * (QueryEditorExtensions) change isEnabled to an observable * rename search bar extension to query editor extension in comments * Changeset file for PR #7183 created/updated --------- (cherry picked from commit 774f64ed887f8a86af10423bb66b5128dd14c40e) Signed-off-by: Joshua Li Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7183.yml | 2 ++ .../query_editor_extension.test.tsx | 7 ++++--- .../query_editor_extension.tsx | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 changelogs/fragments/7183.yml diff --git a/changelogs/fragments/7183.yml b/changelogs/fragments/7183.yml new file mode 100644 index 000000000000..f3fc5235226d --- /dev/null +++ b/changelogs/fragments/7183.yml @@ -0,0 +1,2 @@ +feat: +- [QueryEditorExtensions] change `isEnabled` to an observable ([#7183](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7183)) \ No newline at end of file diff --git a/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.test.tsx b/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.test.tsx index b3c8747e833d..6ff348fbf3bd 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.test.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.test.tsx @@ -5,6 +5,7 @@ import { render, waitFor } from '@testing-library/react'; import React, { ComponentProps } from 'react'; +import { of } from 'rxjs'; import { IIndexPattern } from '../../../../common'; import { QueryEditorExtension } from './query_editor_extension'; @@ -39,7 +40,7 @@ describe('QueryEditorExtension', () => { config: { id: 'test-extension', order: 1, - isEnabled: isEnabledMock, + isEnabled$: isEnabledMock, getComponent: getComponentMock, getBanner: getBannerMock, }, @@ -56,7 +57,7 @@ describe('QueryEditorExtension', () => { }); it('renders correctly when isEnabled is true', async () => { - isEnabledMock.mockResolvedValue(true); + isEnabledMock.mockReturnValue(of(true)); getComponentMock.mockReturnValue(
Test Component
); getBannerMock.mockReturnValue(
Test Banner
); @@ -72,7 +73,7 @@ describe('QueryEditorExtension', () => { }); it('does not render when isEnabled is false', async () => { - isEnabledMock.mockResolvedValue(false); + isEnabledMock.mockReturnValue(of(false)); getComponentMock.mockReturnValue(
Test Component
); const { queryByText } = render(); diff --git a/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.tsx b/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.tsx index 30b02f0f15dc..f684aebea1d9 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor_extensions/query_editor_extension.tsx @@ -6,6 +6,7 @@ import { EuiErrorBoundary } from '@elastic/eui'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import ReactDOM from 'react-dom'; +import { Observable } from 'rxjs'; import { IIndexPattern } from '../../../../common'; import { DataSource } from '../../../data_sources/datasource'; @@ -33,7 +34,7 @@ export interface QueryEditorExtensionDependencies { export interface QueryEditorExtensionConfig { /** - * The id for the search bar extension. + * The id for the query editor extension. */ id: string; /** @@ -41,22 +42,22 @@ export interface QueryEditorExtensionConfig { */ order: number; /** - * A function that determines if the search bar extension is enabled and should be rendered on UI. + * A function that determines if the query editor extension is enabled and should be rendered on UI. * @returns whether the extension is enabled. */ - isEnabled: (dependencies: QueryEditorExtensionDependencies) => Promise; + isEnabled$: (dependencies: QueryEditorExtensionDependencies) => Observable; /** - * A function that returns the search bar extension component. The component + * A function that returns the query editor extension component. The component * will be displayed on top of the query editor in the search bar. * @param dependencies - The dependencies required for the extension. - * @returns The component the search bar extension. + * @returns The component the query editor extension. */ getComponent?: (dependencies: QueryEditorExtensionDependencies) => React.ReactElement | null; /** - * A function that returns the search bar extension banner. The banner is a + * A function that returns the query editor extension banner. The banner is a * component that will be displayed on top of the search bar. * @param dependencies - The dependencies required for the extension. - * @returns The component the search bar extension. + * @returns The component the query editor extension. */ getBanner?: (dependencies: QueryEditorExtensionDependencies) => React.ReactElement | null; } @@ -92,9 +93,10 @@ export const QueryEditorExtension: React.FC = (props) }, []); useEffect(() => { - props.config.isEnabled(props.dependencies).then((enabled) => { + const subscription = props.config.isEnabled$(props.dependencies).subscribe((enabled) => { if (isMounted.current) setIsEnabled(enabled); }); + return () => subscription.unsubscribe(); }, [props.dependencies, props.config]); if (!isEnabled) return null; From 9e05d0074749ae2c48741a12714557285e7d3543 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:25:29 -0700 Subject: [PATCH 03/12] [Discover-next] remove plugin config toggle for data enhancements (#7291) (#7293) * [Discover-next] remove plugin config toggle for data enhancements Remove the data config toggle for enhancements and rely on the UI settings for being enabled. (cherry picked from commit 5761207dd2b673563db2638bfc475ecb6b246c0d) Signed-off-by: Kawika Avilla Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7291.yml | 2 ++ config/opensearch_dashboards.yml | 3 --- package.json | 2 +- src/core/server/rendering/views/template.tsx | 2 -- src/plugins/data/common/constants.ts | 1 - src/plugins/data/config.ts | 1 - .../public/ui/query_editor/query_editor_top_row.tsx | 3 --- src/plugins/data/public/ui/settings/settings.ts | 2 +- src/plugins/data/server/ui_settings.ts | 13 ------------- 9 files changed, 4 insertions(+), 25 deletions(-) create mode 100644 changelogs/fragments/7291.yml diff --git a/changelogs/fragments/7291.yml b/changelogs/fragments/7291.yml new file mode 100644 index 000000000000..8d1d6b4f8a63 --- /dev/null +++ b/changelogs/fragments/7291.yml @@ -0,0 +1,2 @@ +deprecate: +- Remove data enhancements config and readonly flag. Removes dead url link, ([#7291](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7291)) \ No newline at end of file diff --git a/config/opensearch_dashboards.yml b/config/opensearch_dashboards.yml index bc46a1bdd2b0..969fec9e8fa9 100644 --- a/config/opensearch_dashboards.yml +++ b/config/opensearch_dashboards.yml @@ -359,9 +359,6 @@ # This publishes the Application Usage and UI Metrics into the saved object, which can be accessed by /api/stats?extended=true&legacy=true&exclude_usage=false # usageCollection.uiMetric.enabled: false -# Set the value to true to enable enhancements for the data plugin -# data.enhancements.enabled: false - # Set the backend roles in groups or users, whoever has the backend roles or exactly match the user ids defined in this config will be regard as dashboard admin. # Dashboard admin will have the access to all the workspaces(workspace.enabled: true) and objects inside OpenSearch Dashboards. # opensearchDashboards.dashboardAdmin.groups: ["dashboard_admin"] diff --git a/package.json b/package.json index 1de337527a91..92a4d23b9100 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "start": "scripts/use_node scripts/opensearch_dashboards --dev", "start:docker": "scripts/use_node scripts/opensearch_dashboards --dev --opensearch.hosts=$OPENSEARCH_HOSTS --opensearch.ignoreVersionMismatch=true --server.host=$SERVER_HOST", "start:security": "scripts/use_node scripts/opensearch_dashboards --dev --security", - "start:enhancements": "scripts/use_node scripts/opensearch_dashboards --dev --data.enhancements.enabled=true --data_source.enabled=true --uiSettings.overrides['query:enhancements:enabled']=true --uiSettings.overrides['query:dataSource:readOnly']=false", + "start:enhancements": "scripts/use_node scripts/opensearch_dashboards --dev --data_source.enabled=true --uiSettings.overrides['query:enhancements:enabled']=true", "debug": "scripts/use_node --nolazy --inspect scripts/opensearch_dashboards --dev", "debug-break": "scripts/use_node --nolazy --inspect-brk scripts/opensearch_dashboards --dev", "lint": "yarn run lint:es && yarn run lint:style", diff --git a/src/core/server/rendering/views/template.tsx b/src/core/server/rendering/views/template.tsx index 8aa7903d8df1..7ed7c316ecbc 100644 --- a/src/core/server/rendering/views/template.tsx +++ b/src/core/server/rendering/views/template.tsx @@ -67,8 +67,6 @@ export const Template: FunctionComponent = ({ * ToDo: Custom branded favicons will not work correctly across all browsers with * these `link` elements and single type. Try to guess the image and use only one. * - * Favicons (generated from https://realfavicongenerator.net/) - * * For user customized favicon using yml file: * If user inputs a valid URL, we guarantee basic favicon customization, such as * browser favicon(Chrome, Firefox, Safari, and Edge), apple touch icon, safari diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index a00adb0b6290..863877322ad9 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -62,6 +62,5 @@ export const UI_SETTINGS = { FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues', QUERY_ENHANCEMENTS_ENABLED: 'query:enhancements:enabled', QUERY_DATAFRAME_HYDRATION_STRATEGY: 'query:dataframe:hydrationStrategy', - QUERY_DATA_SOURCE_READONLY: 'query:dataSource:readOnly', SEARCH_QUERY_LANGUAGE_BLOCKLIST: 'search:queryLanguageBlocklist', } as const; diff --git a/src/plugins/data/config.ts b/src/plugins/data/config.ts index 53252fb74b42..186691f3c917 100644 --- a/src/plugins/data/config.ts +++ b/src/plugins/data/config.ts @@ -32,7 +32,6 @@ import { schema, TypeOf } from '@osd/config-schema'; export const configSchema = schema.object({ enhancements: schema.object({ - enabled: schema.boolean({ defaultValue: false }), supportedAppNames: schema.arrayOf(schema.string(), { defaultValue: ['discover'], }), diff --git a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx index 3ea715418ab1..2f6f47659cdc 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx @@ -75,8 +75,6 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { const opensearchDashboards = useOpenSearchDashboards(); const { uiSettings, storage, appName } = opensearchDashboards.services; - const isDataSourceReadOnly = uiSettings.get(UI_SETTINGS.QUERY_DATA_SOURCE_READONLY); - const queryLanguage = props.query && props.query.language; const queryUiEnhancement = (queryLanguage && @@ -197,7 +195,6 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { return ( !Array.isArray(props.indexPatterns!) || compact(props.indexPatterns!).length === 0 || - !isDataSourceReadOnly || fromUser(query!.query).includes( typeof props.indexPatterns[0] === 'string' ? props.indexPatterns[0] diff --git a/src/plugins/data/public/ui/settings/settings.ts b/src/plugins/data/public/ui/settings/settings.ts index 10a72d66cdab..f90bee5cf47e 100644 --- a/src/plugins/data/public/ui/settings/settings.ts +++ b/src/plugins/data/public/ui/settings/settings.ts @@ -35,7 +35,7 @@ export class Settings { private readonly queryEnhancements: Map, private readonly queryEditorExtensionMap: Record ) { - this.isEnabled = this.config.enabled; + this.isEnabled = false; this.setUserQueryEnhancementsEnabled(this.isEnabled); this.enhancedAppNames = this.isEnabled ? this.config.supportedAppNames : []; } diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index ca24151e681d..dfe27d16c252 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -750,19 +750,6 @@ export function getUiSettings(): Record> { category: ['search'], schema: schema.string(), }, - [UI_SETTINGS.QUERY_DATA_SOURCE_READONLY]: { - name: i18n.translate('data.advancedSettings.query.dataSource.readOnlyTitle', { - defaultMessage: 'Read-only data source in query editor', - }), - value: true, - description: i18n.translate('data.advancedSettings.query.dataSource.readOnlyText', { - defaultMessage: - 'When enabled, the search bar prevents modifying the data source in the query input. ' + - 'Experimental: Requires query enhancements enabled.', - }), - category: ['search'], - schema: schema.boolean(), - }, [UI_SETTINGS.SEARCH_QUERY_LANGUAGE_BLOCKLIST]: { name: i18n.translate('data.advancedSettings.searchQueryLanguageBlocklistTitle', { defaultMessage: 'Additional query languages blocklist', From 535f16a901252b98eb0bda6295199596b52eca7d Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:07:44 -0700 Subject: [PATCH 04/12] Wrap error renderer in span (#7265) (#7290) (cherry picked from commit a34389e4e2800874d9255b651bbb0736b905c363) Signed-off-by: Craig Perkins Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../public/history/redirect_when_missing.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/opensearch_dashboards_utils/public/history/redirect_when_missing.tsx b/src/plugins/opensearch_dashboards_utils/public/history/redirect_when_missing.tsx index 2fe7823b89a6..6256bffd2697 100644 --- a/src/plugins/opensearch_dashboards_utils/public/history/redirect_when_missing.tsx +++ b/src/plugins/opensearch_dashboards_utils/public/history/redirect_when_missing.tsx @@ -28,7 +28,7 @@ * under the License. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { History } from 'history'; import { i18n } from '@osd/i18n'; import { EuiLoadingSpinner } from '@elastic/eui'; @@ -37,10 +37,9 @@ import ReactDOM from 'react-dom'; import { ApplicationStart, HttpStart, ToastsSetup } from 'opensearch-dashboards/public'; import { SavedObjectNotFound } from '..'; -const ReactMarkdown = React.lazy(() => import('react-markdown')); const ErrorRenderer = (props: { children: string }) => ( }> - + {props.children} ); From 0dc5cecf44b39023f65bae87366c56b17db62256 Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Wed, 24 Jul 2024 23:18:50 +0000 Subject: [PATCH 05/12] Revert "[2.16] Fix minor issues for Direct Query Datasource (#7419)" This reverts commit 289a7c0c1a1f0b4eec0d1b9608ff4f9c7f77c6b8. --- .../data_source_home_panel.test.tsx.snap | 22 +- .../data_source_home_panel.test.tsx | 8 +- .../data_source_home_panel.tsx | 14 +- .../direct_query_connection_detail.test.tsx | 22 +- .../direct_query_connection_detail.tsx | 40 +- ...query_data_connections_table.test.tsx.snap | 1306 +++++++++++------ ...rect_query_data_connections_table.test.tsx | 193 ++- ...ge_direct_query_data_connections_table.tsx | 92 +- .../public/components/utils.ts | 20 - .../server/routes/data_connections_router.ts | 46 - 10 files changed, 1045 insertions(+), 718 deletions(-) diff --git a/src/plugins/data_source_management/public/components/data_source_home_panel/__snapshots__/data_source_home_panel.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_home_panel/__snapshots__/data_source_home_panel.test.tsx.snap index 40402f99f0a0..4db09dab5b2a 100644 --- a/src/plugins/data_source_management/public/components/data_source_home_panel/__snapshots__/data_source_home_panel.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_home_panel/__snapshots__/data_source_home_panel.test.tsx.snap @@ -44,17 +44,17 @@ exports[`DataSourceHomePanel renders correctly 1`] = ` - OpenSearch connections + Direct query connections - Direct query connections + OpenSearch connections @@ -62,14 +62,12 @@ exports[`DataSourceHomePanel renders correctly 1`] = ` - diff --git a/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.test.tsx b/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.test.tsx index 1f451b1531e9..017f450c11ae 100644 --- a/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.test.tsx +++ b/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.test.tsx @@ -67,23 +67,23 @@ describe('DataSourceHomePanel', () => { test('renders DataSourceTableWithRouter when manageOpensearchDataSources tab is selected', () => { const wrapper = mountComponent(); - wrapper.find(EuiTab).at(0).simulate('click'); + wrapper.find(EuiTab).at(1).simulate('click'); expect(wrapper.find(DataSourceTableWithRouter)).toHaveLength(1); expect(wrapper.find(ManageDirectQueryDataConnectionsTable)).toHaveLength(0); }); test('renders ManageDirectQueryDataConnectionsTable when manageDirectQueryDataSources tab is selected', () => { const wrapper = mountComponent(); - wrapper.find(EuiTab).at(1).simulate('click'); + wrapper.find(EuiTab).at(0).simulate('click'); expect(wrapper.find(ManageDirectQueryDataConnectionsTable)).toHaveLength(1); expect(wrapper.find(DataSourceTableWithRouter)).toHaveLength(0); }); test('handles tab changes', () => { const wrapper = mountComponent(); - expect(wrapper.find(DataSourceTableWithRouter)).toHaveLength(1); - wrapper.find(EuiTab).at(1).simulate('click'); expect(wrapper.find(ManageDirectQueryDataConnectionsTable)).toHaveLength(1); + wrapper.find(EuiTab).at(1).simulate('click'); + expect(wrapper.find(DataSourceTableWithRouter)).toHaveLength(1); }); test('does not render OpenSearch connections tab when featureFlagStatus is false', () => { diff --git a/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.tsx b/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.tsx index b90c3484654e..219e37e93345 100644 --- a/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.tsx +++ b/src/plugins/data_source_management/public/components/data_source_home_panel/data_source_home_panel.tsx @@ -39,10 +39,7 @@ export const DataSourceHomePanel: React.FC = ({ application, } = useOpenSearchDashboards().services; - const defaultTabId = featureFlagStatus - ? 'manageOpensearchDataSources' - : 'manageDirectQueryDataSources'; - const [selectedTabId, setSelectedTabId] = useState(defaultTabId); + const [selectedTabId, setSelectedTabId] = useState('manageDirectQueryDataSources'); const canManageDataSource = !!application.capabilities?.dataSource?.canManage; useEffect(() => { @@ -54,6 +51,10 @@ export const DataSourceHomePanel: React.FC = ({ }; const tabs = [ + { + id: 'manageDirectQueryDataSources', + name: 'Direct query connections', + }, ...(featureFlagStatus ? [ { @@ -62,10 +63,6 @@ export const DataSourceHomePanel: React.FC = ({ }, ] : []), - { - id: 'manageDirectQueryDataSources', - name: 'Direct query connections', - }, ]; const renderTabs = () => { @@ -113,7 +110,6 @@ export const DataSourceHomePanel: React.FC = ({ savedObjects={savedObjects} uiSettings={uiSettings} featureFlagStatus={featureFlagStatus} - application={application} /> )} diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.test.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.test.tsx index ea13ffd2568f..be1a93c5572b 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.test.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.test.tsx @@ -9,7 +9,6 @@ import '@testing-library/jest-dom'; import { MemoryRouter, Route } from 'react-router-dom'; import { DirectQueryDataConnectionDetail } from './direct_query_connection_detail'; import { ApplicationStart, HttpStart, NotificationsStart } from 'opensearch-dashboards/public'; -import { isPluginInstalled } from '../../utils'; jest.mock('../../../constants', () => ({ DATACONNECTIONS_BASE: '/api/dataconnections', @@ -62,9 +61,19 @@ jest.mock('../associated_object_management/utils/associated_objects_tab_utils', redirectToExplorerS3: jest.fn(), })); -jest.mock('../../utils', () => ({ - isPluginInstalled: jest.fn(), -})); +beforeAll(() => { + global.fetch = jest.fn(() => + Promise.resolve({ + json: () => + Promise.resolve({ status: { statuses: [{ id: 'plugin:observabilityDashboards' }] } }), + }) + ) as jest.Mock; +}); + +afterAll(() => { + global.fetch.mockClear(); + delete global.fetch; +}); const renderComponent = ({ featureFlagStatus = false, @@ -89,11 +98,6 @@ const renderComponent = ({ }; describe('DirectQueryDataConnectionDetail', () => { - beforeEach(() => { - jest.clearAllMocks(); - (isPluginInstalled as jest.Mock).mockResolvedValue(true); - }); - test('renders without crashing', async () => { const mockHttp = { get: jest.fn().mockResolvedValue({ diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.tsx index 0d8e9c98222e..212d8f394afc 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/direct_query_connection_detail.tsx @@ -53,7 +53,6 @@ import { IntegrationInstancesSearchResult, } from '../../../../framework/types'; import { INTEGRATIONS_BASE } from '../../../../framework/utils/shared'; -import { isPluginInstalled } from '../../utils'; interface DirectQueryDataConnectionDetailProps { featureFlagStatus: boolean; @@ -71,6 +70,41 @@ export const DirectQueryDataConnectionDetail: React.FC { const [observabilityDashboardsExists, setObservabilityDashboardsExists] = useState(false); + const checkIfSQLWorkbenchPluginIsInstalled = () => { + fetch('/api/status', { + headers: { + 'Content-Type': 'application/json', + 'osd-xsrf': 'true', + 'accept-language': 'en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.6', + pragma: 'no-cache', + 'sec-fetch-dest': 'empty', + 'sec-fetch-mode': 'cors', + 'sec-fetch-site': 'same-origin', + }, + method: 'GET', + referrerPolicy: 'strict-origin-when-cross-origin', + mode: 'cors', + credentials: 'include', + }) + .then(function (response) { + return response.json(); + }) + .then((data) => { + for (let i = 0; i < data.status.statuses.length; ++i) { + if (data.status.statuses[i].id.includes('plugin:observabilityDashboards')) { + setObservabilityDashboardsExists(true); + } + } + }) + .catch((error) => { + notifications.toasts.addDanger( + 'Error checking Dashboards Observability Plugin Installation status.' + ); + // eslint-disable-next-line no-console + console.error(error); + }); + }; + const { dataSourceName } = useParams<{ dataSourceName: string }>(); const { search } = useLocation(); const queryParams = new URLSearchParams(search); @@ -177,9 +211,7 @@ export const DirectQueryDataConnectionDetail: React.FC { - isPluginInstalled('plugin:observabilityDashboards', notifications, http).then( - setObservabilityDashboardsExists - ); + checkIfSQLWorkbenchPluginIsInstalled(); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/__snapshots__/manage_direct_query_data_connections_table.test.tsx.snap b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/__snapshots__/manage_direct_query_data_connections_table.test.tsx.snap index 90ed2c90c3c1..32bd004f3ee4 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/__snapshots__/manage_direct_query_data_connections_table.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/__snapshots__/manage_direct_query_data_connections_table.test.tsx.snap @@ -1,476 +1,920 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ManageDirectQueryDataConnectionsTable matches snapshot 1`] = ` - -
+
-
-
-
-
-
- -
- - -
-
-
-
-
-
+ +
-
+
-
-
-
-
- - - - - - - - - - - - - - - - - - - - -
-
- - - Name - - - - - - Status - - - - - - Actions - - -
- Name -
-
-
-
- -
-
- -
-
-
-
-
- Status -
-
-
-
-
- -
- Active + + +
+ + + +
+
+ + + Local cluster + + + +
+ +
+
+ +
+ +
+ + + + + + + + +
+
+
+
+ +
-
-
+ +
-
+
- - - - Delete - - -
-
-
- Name -
-
-
-
- -
-
- -
-
-
-
-
- Status -
-
-
-
- +
+ + + + +
+ + + + + +
+
+
-
- Inactive -
-
-
+ +
-
-
- - - Accelerate performance - - - - - Delete - - -
-
-
-
-
-
-
+
+ +
+ + +
- -
-
-
-
- -
+ + + + + + + + + + + + + + + + Name + + + + + + + + + + + + + + + Status + + + + + + + + + + + + + + + Actions + + + + + + + + + + + + + + + + +
+ + No items found + +
+ +
+ +
+ +
+ + +
+
+ +
-
+
-
+
-
- + + `; diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.test.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.test.tsx index aa511d65009e..06d1dc61d166 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.test.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.test.tsx @@ -4,134 +4,125 @@ */ import React from 'react'; -import { render, screen, fireEvent, waitFor } from '@testing-library/react'; +import { act } from 'react-dom/test-utils'; +import { mount, ReactWrapper } from 'enzyme'; +import { + HttpStart, + NotificationsStart, + SavedObjectsStart, + IUiSettingsClient, +} from 'opensearch-dashboards/public'; +import { EuiFieldSearch, EuiInMemoryTable, EuiLoadingSpinner } from '@elastic/eui'; import { ManageDirectQueryDataConnectionsTable } from './manage_direct_query_data_connections_table'; -// Mock dependencies -jest.mock('react-router-dom', () => ({ - useHistory: () => ({ - push: jest.fn(), - }), -})); +const mockHttp = ({ + get: jest.fn(), +} as unknown) as jest.Mocked; -jest.mock('../../../plugin', () => ({ - getRenderCreateAccelerationFlyout: jest.fn(() => jest.fn()), -})); +const mockNotifications = ({ + toasts: { addDanger: jest.fn(), addSuccess: jest.fn(), addWarning: jest.fn() }, +} as unknown) as jest.Mocked; -jest.mock('../icons/prometheus_logo.svg', () => 'prometheusLogo'); -jest.mock('../icons/s3_logo.svg', () => 's3Logo'); -jest.mock('../integrations/installed_integrations_table', () => ({ - InstallIntegrationFlyout: jest.fn(() =>
MockInstallIntegrationFlyout
), -})); +const mockSavedObjects = ({ + client: {}, +} as unknown) as jest.Mocked; + +const mockUiSettings = ({} as unknown) as jest.Mocked; + +const defaultProps = { + http: mockHttp, + notifications: mockNotifications, + savedObjects: mockSavedObjects, + uiSettings: mockUiSettings, + featureFlagStatus: true, +}; describe('ManageDirectQueryDataConnectionsTable', () => { - const mockHttp = { get: jest.fn(), delete: jest.fn() }; - const mockNotifications = { toasts: { addSuccess: jest.fn(), addDanger: jest.fn() } }; - const mockSavedObjects = { client: {} }; - const mockUiSettings = {}; - const mockApplication = { navigateToApp: jest.fn() }; - - const defaultProps = { - http: mockHttp, - notifications: mockNotifications, - savedObjects: mockSavedObjects, - uiSettings: mockUiSettings, - featureFlagStatus: false, - application: mockApplication, - }; + let wrapper: ReactWrapper; beforeEach(() => { jest.clearAllMocks(); }); - test('renders data connections', async () => { - mockHttp.get.mockResolvedValue([ - { name: 'connection1', connector: 'PROMETHEUS', status: 'ACTIVE' }, - { name: 'connection2', connector: 'S3GLUE', status: 'INACTIVE' }, - ]); + test('renders correctly', async () => { + mockHttp.get.mockResolvedValueOnce([]); // Mock an empty array for the initial fetch - render(); - await waitFor(() => expect(screen.getByText('connection1')).toBeInTheDocument()); - expect(screen.getByText('connection2')).toBeInTheDocument(); + await act(async () => { + wrapper = mount(); + }); + wrapper.update(); + expect(wrapper).toMatchSnapshot(); }); - test('handles search input change', async () => { - mockHttp.get.mockResolvedValue([ - { name: 'connection1', connector: 'PROMETHEUS', status: 'ACTIVE' }, - { name: 'connection2', connector: 'S3GLUE', status: 'INACTIVE' }, - ]); - - render(); - await waitFor(() => expect(screen.getByText('connection1')).toBeInTheDocument()); + test('displays loading spinner while fetching data', async () => { + let resolveFetch; + const fetchPromise = new Promise((resolve) => { + resolveFetch = resolve; + }); + mockHttp.get.mockImplementation(() => fetchPromise); - const searchInput = screen.getByPlaceholderText('Search...'); - fireEvent.change(searchInput, { target: { value: 'connection2' } }); + await act(async () => { + wrapper = mount(); + }); - expect(screen.queryByText('connection1')).not.toBeInTheDocument(); - expect(screen.getByText('connection2')).toBeInTheDocument(); - }); + wrapper.update(); - test('displays error on failed fetch', async () => { - mockHttp.get.mockRejectedValue(new Error('Fetch error')); + expect(wrapper.find(EuiLoadingSpinner).exists()).toBe(true); - render(); - - await waitFor(() => - expect(mockNotifications.toasts.addDanger).toHaveBeenCalledWith( - 'Could not fetch data sources' - ) - ); + // Simulate fetch completion + await act(async () => { + resolveFetch([]); + }); + wrapper.update(); }); - test('matches snapshot', async () => { - mockHttp.get.mockResolvedValue([ - { name: 'connection1', connector: 'PROMETHEUS', status: 'ACTIVE' }, - { name: 'connection2', connector: 'S3GLUE', status: 'INACTIVE' }, + test('fetches and displays data connections', async () => { + mockHttp.get.mockResolvedValueOnce([ + { + name: 'Test Connection', + connector: 'S3GLUE', + status: 'ACTIVE', + }, ]); - const { asFragment } = render(); - await waitFor(() => expect(screen.getByText('connection1')).toBeInTheDocument()); - expect(asFragment()).toMatchSnapshot(); + await act(async () => { + wrapper = mount(); + }); + wrapper.update(); + + expect(wrapper.find(EuiInMemoryTable).prop('items')).toHaveLength(1); }); - // Conditional rendering tests - test('renders no connections message when there are no connections', async () => { - mockHttp.get.mockResolvedValue([]); + test('filters data connections based on search text', async () => { + mockHttp.get.mockResolvedValueOnce([ + { + name: 'Test Connection', + connector: 'S3GLUE', + status: 'ACTIVE', + }, + { + name: 'Another Connection', + connector: 'PROMETHEUS', + status: 'INACTIVE', + }, + ]); - render(); - await waitFor(() => expect(screen.getByText('No items found')).toBeInTheDocument()); - }); + await act(async () => { + wrapper = mount(); + }); + wrapper.update(); - test('renders error message when fetch fails', async () => { - mockHttp.get.mockRejectedValue(new Error('Fetch error')); + const searchInput = wrapper.find(EuiFieldSearch); + expect(searchInput.exists()).toBe(true); - render(); - await waitFor(() => - expect(mockNotifications.toasts.addDanger).toHaveBeenCalledWith( - 'Could not fetch data sources' - ) - ); - }); + await act(async () => { + searchInput.find('input').simulate('change', { target: { value: 'Test' } }); + }); + wrapper.update(); - test('displays loading indicator while fetching data', async () => { - mockHttp.get.mockImplementation( - () => - new Promise((resolve) => { - setTimeout( - () => - resolve([ - { name: 'connection1', connector: 'PROMETHEUS', status: 'ACTIVE' }, - { name: 'connection2', connector: 'S3GLUE', status: 'INACTIVE' }, - ]), - 1000 - ); - }) - ); - - render(); - expect(screen.getByText('Loading direct query data connections...')).toBeInTheDocument(); - - await waitFor(() => expect(screen.getByText('connection1')).toBeInTheDocument()); - expect(screen.queryByText('Loading direct query data connections...')).not.toBeInTheDocument(); + const table = wrapper.find(EuiInMemoryTable); + const items = table.prop('items') as any[]; + expect(items).toHaveLength(1); + expect(items[0].name).toBe('Test Connection'); }); }); diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.tsx index 4ec4e9a7fe8f..e6ad73b88a21 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table.tsx @@ -20,7 +20,6 @@ import { } from '@elastic/eui'; import React, { useCallback, useEffect, useState } from 'react'; import { - ApplicationStart, HttpStart, IUiSettingsClient, NotificationsStart, @@ -37,11 +36,7 @@ import PrometheusLogo from '../icons/prometheus_logo.svg'; import S3Logo from '../icons/s3_logo.svg'; import { DataSourceSelector } from '../../data_source_selector'; import { DataSourceOption } from '../../data_source_menu/types'; -import { DATACONNECTIONS_BASE, observabilityMetricsID } from '../../../constants'; -import { getRenderCreateAccelerationFlyout } from '../../../plugin'; -import { InstallIntegrationFlyout } from '../integrations/installed_integrations_table'; -import { redirectToExplorerS3 } from '../associated_object_management/utils/associated_objects_tab_utils'; -import { isPluginInstalled } from '../../utils'; +import { DATACONNECTIONS_BASE } from '../../../constants'; interface DataConnection { connectionType: DirectQueryDatasourceType; @@ -55,7 +50,6 @@ interface ManageDirectQueryDataConnectionsTableProps { savedObjects: SavedObjectsStart; uiSettings: IUiSettingsClient; featureFlagStatus: boolean; - application: ApplicationStart; } // Custom truncate function @@ -70,16 +64,10 @@ export const ManageDirectQueryDataConnectionsTable: React.FC { - const [observabilityDashboardsExists, setObservabilityDashboardsExists] = useState(false); - const [showIntegrationsFlyout, setShowIntegrationsFlyout] = useState(false); - const [integrationsFlyout, setIntegrationsFlyout] = useState(null); - const [data, setData] = useState([]); const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); - const [selectedConnection, setSelectedConnection] = useState(undefined); const [selectedDataSourceId, setSelectedDataSourceId] = useState(''); const [searchText, setSearchText] = useState(''); const [isLoading, setIsLoading] = useState(false); @@ -111,42 +99,8 @@ export const ManageDirectQueryDataConnectionsTable: React.FC { - if (!connectionName) return; - - const endpoint = - featureFlagStatus && selectedDataSourceId !== undefined - ? `${DATACONNECTIONS_BASE}/${connectionName}/dataSourceMDSId=${selectedDataSourceId}` - : `${DATACONNECTIONS_BASE}/${connectionName}`; - - setIsLoading(true); - - http - .delete(endpoint) - .then(() => { - notifications.toasts.addSuccess(`Data connection ${connectionName} deleted successfully`); - setData(data.filter((connection) => connection.name !== connectionName)); - }) - .catch((err) => { - notifications.toasts.addDanger( - `Data connection ${connectionName} not deleted. See output for more details.` - ); - }) - .finally(() => { - setIsLoading(false); - setSelectedConnection(undefined); // Clear the selected connection after deletion - }); - }, - [http, notifications.toasts, selectedDataSourceId, featureFlagStatus, data] - ); - useEffect(() => { fetchDataSources(); - isPluginInstalled('plugin:observabilityDashboards', notifications, http).then( - setObservabilityDashboardsExists - ); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [fetchDataSources]); const handleSelectedDataSourceChange = (e: DataSourceOption[]) => { @@ -154,17 +108,19 @@ export const ManageDirectQueryDataConnectionsTable: React.FC { + setData(data.filter((connection) => !(connection.name === connectionName))); + }; + const displayDeleteModal = (connectionName: string) => { - setSelectedConnection(connectionName); setModalLayout( { setIsModalVisible(false); - deleteDataSources(connectionName); + deleteConnection(connectionName); }} onCancel={() => { setIsModalVisible(false); - setSelectedConnection(undefined); // Clear the selected connection if cancel is clicked }} title={`Delete ${connectionName}`} message={`Are you sure you want to delete ${connectionName}?`} @@ -173,8 +129,6 @@ export const ManageDirectQueryDataConnectionsTable: React.FC @@ -184,14 +138,7 @@ export const ManageDirectQueryDataConnectionsTable: React.FC observabilityDashboardsExists, - onClick: (datasource: DataConnection) => { - if (datasource.connectionType === 'PROMETHEUS') { - application!.navigateToApp(observabilityMetricsID); - } else if (datasource.connectionType === 'S3GLUE') { - redirectToExplorerS3(datasource.name, application); - } - }, + onClick: () => {}, 'data-test-subj': 'action-query', }, { @@ -200,12 +147,7 @@ export const ManageDirectQueryDataConnectionsTable: React.FC datasource.connectionType !== 'PROMETHEUS', - onClick: (datasource: DataConnection) => { - renderCreateAccelerationFlyout({ - dataSourceName: datasource.name, - dataSourceMDSId: selectedDataSourceId, - }); - }, + onClick: () => {}, 'data-test-subj': 'action-accelerate', }, { @@ -213,21 +155,8 @@ export const ManageDirectQueryDataConnectionsTable: React.FC - !featureFlagStatus && - observabilityDashboardsExists && - datasource.connectionType !== 'PROMETHEUS', - onClick: (datasource: DataConnection) => { - setIntegrationsFlyout( - setShowIntegrationsFlyout(false)} - datasourceType={datasource.connectionType} - datasourceName={datasource.name} - http={http} - /> - ); - setShowIntegrationsFlyout(true); - }, + available: (datasource: DataConnection) => datasource.connectionType !== 'PROMETHEUS', + onClick: () => {}, 'data-test-subj': 'action-integrate', }, { @@ -354,7 +283,6 @@ export const ManageDirectQueryDataConnectionsTable: React.FC {isModalVisible && modalLayout} - {showIntegrationsFlyout && integrationsFlyout} ); }; diff --git a/src/plugins/data_source_management/public/components/utils.ts b/src/plugins/data_source_management/public/components/utils.ts index 848244fc67e8..b1ccf2c9130c 100644 --- a/src/plugins/data_source_management/public/components/utils.ts +++ b/src/plugins/data_source_management/public/components/utils.ts @@ -11,7 +11,6 @@ import { ToastsStart, ApplicationStart, CoreStart, - NotificationsStart, } from 'src/core/public'; import { deepFreeze } from '@osd/std'; import uuid from 'uuid'; @@ -407,22 +406,3 @@ export const formatError = (name: string, message: string, details: string) => { }, }; }; - -export const isPluginInstalled = async ( - pluginId: string, - notifications: NotificationsStart, - http: HttpStart -): Promise => { - try { - const response = await http.get('/api/status'); - const pluginExists = response.status.statuses.some((status: { id: string }) => - status.id.includes(pluginId) - ); - return pluginExists; - } catch (error) { - notifications.toasts.addDanger(`Error checking ${pluginId} Plugin Installation status.`); - // eslint-disable-next-line no-console - console.error(error); - return false; - } -}; diff --git a/src/plugins/data_source_management/server/routes/data_connections_router.ts b/src/plugins/data_source_management/server/routes/data_connections_router.ts index 6b8dc4b42054..87b40b90dc16 100644 --- a/src/plugins/data_source_management/server/routes/data_connections_router.ts +++ b/src/plugins/data_source_management/server/routes/data_connections_router.ts @@ -291,50 +291,4 @@ export function registerDataConnectionsRoute(router: IRouter, dataSourceEnabled: } } ); - - router.delete( - { - path: `${DATACONNECTIONS_BASE}/{name}/dataSourceMDSId={dataSourceMDSId?}`, - validate: { - params: schema.object({ - name: schema.string(), - dataSourceMDSId: schema.maybe(schema.string({ defaultValue: '' })), - }), - }, - }, - async (context, request, response): Promise => { - const dataSourceMDSId = request.params.dataSourceMDSId; - try { - let dataConnectionsresponse; - if (dataSourceEnabled && dataSourceMDSId) { - const client = await context.dataSource.opensearch.legacy.getClient(dataSourceMDSId); - dataConnectionsresponse = await client.callAPI('ppl.deleteDataConnection', { - dataconnection: request.params.name, - }); - } else { - dataConnectionsresponse = await context.opensearch_data_source_management.dataSourceManagementClient - .asScoped(request) - .callAsCurrentUser('ppl.deleteDataConnection', { - dataconnection: request.params.name, - }); - } - return response.ok({ - body: dataConnectionsresponse, - }); - } catch (error: any) { - console.error('Issue in deleting data sources:', error); - const statusCode = error.statusCode || error.body?.statusCode || 500; - const errorBody = error.body || - error.response || { message: error.message || 'Unknown error occurred' }; - - return response.custom({ - statusCode, - body: { - error: errorBody, - message: errorBody.message || error.message, - }, - }); - } - } - ); } From 0cfdd0bcf9c2bfe5411d30539422b86cc2e48dad Mon Sep 17 00:00:00 2001 From: Miki Date: Tue, 23 Jul 2024 16:42:42 -0700 Subject: [PATCH 06/12] Use smaller and compressed varients of buttons and form components (#7304) (#7417) * Bump OUI * Use EuiSmallButton * Use EuiSmallButtonIcon * Use EuiSmallButtonEmpty * Use EuiCompressedFormRow * Use EuiCompressedField* * Use EuiCompressedSelect and EuiCompressedSuperSelect * Use EuiCompressedCheckbox and EuiCompressedCheckboxGroup * Use EuiCompressedFilePicker * Use EuiCompressedRadio and EuiCompressedRadioGroup * Use EuiCompressedSwitch * Use EuiCompressedEuiTextArea * Use EuiCompressedComboBox * Use compressed ValidatedDualRange * Use EuiSmallFilterButton * Undo unnecessary EuiSmallButton* uses * Revisit size and density changes in workspaces * Fix unit tests --------- (cherry picked from commit 6f28170af93d842a0567c74bbabfe6ba9e5314c0) Signed-off-by: Miki --- package.json | 2 +- .../template/public/components/app.tsx.ejs | 2 +- packages/osd-ui-framework/package.json | 2 +- packages/osd-ui-shared-deps/package.json | 2 +- .../fatal_errors_screen.test.tsx.snap | 8 +- .../fatal_errors/fatal_errors_screen.tsx | 12 +- .../notifications/toasts/error_toast.tsx | 5 +- .../field/__snapshots__/field.test.tsx.snap | 412 ++++---- .../management_app/components/field/field.tsx | 28 +- .../__snapshots__/import_flyout.test.tsx.snap | 156 +-- .../import_mode_control.test.tsx.snap | 2 +- .../application/components/import_flyout.tsx | 14 +- .../components/import_mode_control.test.tsx | 2 +- .../components/import_mode_control.tsx | 4 +- .../application/components/settings_modal.tsx | 54 +- .../something_went_wrong_callout.tsx | 6 +- .../application/components/welcome_panel.tsx | 6 +- .../console_history/console_history.tsx | 16 +- .../__snapshots__/create_button.test.tsx.snap | 207 ++-- .../dashboard_listing.test.tsx.snap | 16 +- .../dashboard_listing/create_button.tsx | 15 +- .../__snapshots__/clone_modal.test.js.snap | 10 +- .../__snapshots__/save_modal.test.js.snap | 16 +- .../dashboard_top_nav/top_nav/clone_modal.tsx | 16 +- .../dashboard_top_nav/top_nav/options.tsx | 14 +- .../dashboard_top_nav/top_nav/save_modal.tsx | 14 +- .../application/utils/get_nav_actions.tsx | 4 +- .../utils/get_no_items_message.tsx | 6 +- .../data_selector_refresher.tsx | 4 +- .../datasource_selectable.tsx | 4 +- .../apply_filter_popover_content.tsx | 21 +- .../filter_editor/generic_combo_box.tsx | 4 +- .../ui/filter_bar/filter_editor/index.tsx | 41 +- .../filter_editor/phrase_value_input.tsx | 6 +- .../filter_editor/phrases_values_input.tsx | 6 +- .../filter_editor/value_input_type.tsx | 16 +- .../public/ui/filter_bar/filter_options.tsx | 4 +- .../index_pattern_select.tsx | 4 +- .../query_editor/language_selector.test.tsx | 6 +- .../ui/query_editor/language_selector.tsx | 8 +- .../ui/query_editor/query_editor_top_row.tsx | 4 +- .../query_string_input/language_switcher.tsx | 10 +- .../query_string_input/query_bar_top_row.tsx | 4 +- .../query_string_input/query_string_input.tsx | 6 +- .../ui/saved_query_form/save_query_form.tsx | 46 +- .../saved_query_management_component.tsx | 5 +- .../shard_failure_modal.test.tsx.snap | 4 +- .../shard_failure_modal.tsx | 12 +- .../shard_failure_table.tsx | 4 +- .../__snapshots__/create_button.test.tsx.snap | 4 +- .../create_button/create_button.tsx | 6 +- .../create_data_source_form.test.tsx.snap | 168 ++-- .../create_form/create_data_source_form.tsx | 81 +- .../data_source_error_menu.tsx | 2 +- .../data_source_table.test.tsx.snap | 151 +-- .../data_source_table/data_source_table.tsx | 6 +- ...ery_data_source_delete_modal.test.tsx.snap | 16 +- ...query_data_connections_table.test.tsx.snap | 20 +- .../direct_query_data_source_delete_modal.tsx | 22 +- ...rect_query_data_connections_table.test.tsx | 4 +- ...ge_direct_query_data_connections_table.tsx | 4 +- .../query_permissions.test.tsx.snap | 185 ++-- ...figure_amazon_s3_data_source.test.tsx.snap | 890 ++++++++++-------- ...review_amazon_s3_data_source.test.tsx.snap | 63 +- .../configure_amazon_s3_data_source.tsx | 42 +- .../review_amazon_s3_data_source.tsx | 6 +- .../direct_query_data_source_auth_details.tsx | 36 +- .../name_row.tsx | 8 +- ...igure_prometheus_data_source.test.tsx.snap | 785 ++++++++------- ...eview_prometheus_data_source.test.tsx.snap | 63 +- .../configure_prometheus_data_source.tsx | 28 +- .../review_prometheus_data_source.tsx | 6 +- .../query_permissions.test.tsx | 12 +- .../query_permissions.tsx | 14 +- .../edit_form/edit_data_source_form.tsx | 77 +- .../components/header/header.tsx | 16 +- .../update_aws_credential_modal.test.tsx | 6 +- .../update_aws_credential_modal.tsx | 40 +- .../update_password_modal.test.tsx.snap | 576 ++++++------ .../update_password_modal.tsx | 36 +- ...data_grid_table_docview_inspect_button.tsx | 4 +- .../default_discover_table.tsx | 6 +- .../default_discover_table/table_cell.tsx | 6 +- .../table_header_column.tsx | 4 +- .../default_discover_table/table_row.tsx | 4 +- .../components/action_bar/action_bar.tsx | 17 +- .../components/sidebar/discover_field.tsx | 5 +- .../sidebar/discover_field_bucket.tsx | 6 +- .../sidebar/discover_field_search.tsx | 14 +- .../components/sidebar/discover_sidebar.tsx | 6 +- .../table/table_row_btn_collapse.tsx | 4 +- .../table/table_row_btn_filter_add.tsx | 4 +- .../table/table_row_btn_filter_exists.tsx | 4 +- .../table/table_row_btn_filter_remove.tsx | 4 +- .../table/table_row_btn_toggle_column.tsx | 6 +- .../open_search_panel.test.tsx.snap | 4 +- .../components/top_nav/open_search_panel.tsx | 7 +- .../uninitialized/uninitialized.tsx | 6 +- .../view_components/canvas/index.tsx | 10 +- .../components/panel_options_menu/index.tsx | 4 +- .../saved_object_finder_create_new.tsx | 6 +- .../customize_title/customize_panel_modal.tsx | 34 +- .../customize_title/customize_title_form.tsx | 12 +- .../panel/panel_header/panel_options_menu.tsx | 4 +- .../actions/get_message_modal.tsx | 20 +- .../embeddables/contact_card/contact_card.tsx | 12 +- .../contact_card/contact_card_initializer.tsx | 26 +- .../sample_data_view_data_button.test.js.snap | 8 +- .../application/components/_add_data.scss | 2 +- .../components/homepage/homepage.tsx | 14 +- .../components/new_theme_modal.tsx | 6 +- .../components/sample_data/index.tsx | 12 +- .../components/sample_data_set_card.js | 16 +- .../sample_data_view_data_button.js | 10 +- .../__snapshots__/footer.test.js.snap | 4 +- .../instruction_set.test.js.snap | 20 +- .../__snapshots__/introduction.test.js.snap | 4 +- .../saved_objects_installer.test.js.snap | 144 +-- .../application/components/tutorial/footer.js | 12 +- .../components/tutorial/instruction_set.js | 12 +- .../components/tutorial/introduction.js | 6 +- .../tutorial/saved_objects_installer.js | 6 +- .../create_button/create_button.tsx | 5 +- .../components/header/header.tsx | 6 +- .../header/__snapshots__/header.test.tsx.snap | 36 +- .../components/header/header.tsx | 34 +- .../step_index_pattern/step_index_pattern.tsx | 6 +- .../action_buttons/action_buttons.tsx | 10 +- .../advanced_options.test.tsx.snap | 16 +- .../advanced_options/advanced_options.tsx | 18 +- .../__snapshots__/time_field.test.tsx.snap | 24 +- .../components/time_field/time_field.tsx | 12 +- .../index_header/index_header.tsx | 8 +- .../header/__snapshots__/header.test.tsx.snap | 2 +- .../components/header/header.tsx | 6 +- .../__snapshots__/add_filter.test.tsx.snap | 12 +- .../components/add_filter/add_filter.test.tsx | 6 +- .../components/add_filter/add_filter.tsx | 8 +- .../components/table/table.test.tsx | 4 +- .../components/table/table.tsx | 4 +- .../edit_index_pattern/tabs/tabs.tsx | 10 +- .../__snapshots__/field_editor.test.tsx.snap | 246 ++--- .../bytes/__snapshots__/bytes.test.tsx.snap | 8 +- .../editors/color/color.tsx | 12 +- .../date/__snapshots__/date.test.tsx.snap | 8 +- .../field_format_editor/editors/date/date.tsx | 14 +- .../__snapshots__/date_nanos.test.tsx.snap | 8 +- .../editors/date_nanos/date_nanos.tsx | 14 +- .../__snapshots__/duration.test.tsx.snap | 48 +- .../editors/duration/duration.tsx | 31 +- .../number/__snapshots__/number.test.tsx.snap | 8 +- .../editors/number/number.tsx | 14 +- .../__snapshots__/percent.test.tsx.snap | 8 +- .../__snapshots__/static_lookup.test.tsx.snap | 16 +- .../editors/static_lookup/static_lookup.tsx | 18 +- .../string/__snapshots__/string.test.tsx.snap | 8 +- .../editors/string/string.tsx | 8 +- .../__snapshots__/truncate.test.tsx.snap | 8 +- .../editors/truncate/truncate.test.tsx | 6 +- .../editors/truncate/truncate.tsx | 8 +- .../url/__snapshots__/url.test.tsx.snap | 112 +-- .../field_format_editor/editors/url/url.tsx | 46 +- .../__snapshots__/samples.test.tsx.snap | 6 +- .../field_format_editor/samples/samples.tsx | 6 +- .../components/scripting_help/test_script.tsx | 16 +- .../field_editor/field_editor.test.tsx | 7 + .../components/field_editor/field_editor.tsx | 66 +- .../__snapshots__/controls_tab.test.tsx.snap | 18 +- .../list_control_editor.test.tsx.snap | 96 +- .../__snapshots__/options_tab.test.tsx.snap | 24 +- .../range_control_editor.test.tsx.snap | 16 +- .../components/editor/control_editor.tsx | 21 +- .../public/components/editor/controls_tab.tsx | 20 +- .../public/components/editor/field_select.tsx | 8 +- .../editor/index_pattern_select_form_row.tsx | 6 +- .../components/editor/list_control_editor.tsx | 33 +- .../public/components/editor/options_tab.tsx | 20 +- .../editor/range_control_editor.tsx | 14 +- .../vis/__snapshots__/form_row.test.tsx.snap | 18 +- .../input_control_vis.test.tsx.snap | 48 +- .../__snapshots__/list_control.test.tsx.snap | 6 +- .../__snapshots__/range_control.test.tsx.snap | 1 + .../public/components/vis/form_row.tsx | 10 +- .../components/vis/input_control_vis.tsx | 14 +- .../public/components/vis/list_control.tsx | 6 +- .../public/components/vis/range_control.tsx | 1 + .../views/data/components/data_table.tsx | 6 +- .../public/top_nav_menu/top_nav_menu_item.tsx | 4 +- .../public/components/flyout_list.tsx | 6 +- .../public/components/_overview.scss | 2 +- .../getting_started.test.tsx.snap | 8 +- .../getting_started/getting_started.tsx | 6 +- .../overview_page_header.test.tsx.snap | 4 +- .../overview_page_header.tsx | 14 +- .../table_list_view/table_list_view.tsx | 10 +- .../components/cron_editor/cron_daily.js | 10 +- .../components/cron_editor/cron_editor.js | 8 +- .../components/cron_editor/cron_hourly.js | 8 +- .../components/cron_editor/cron_monthly.js | 16 +- .../components/cron_editor/cron_weekly.js | 16 +- .../components/cron_editor/cron_yearly.js | 22 +- .../components/json_editor/json_editor.tsx | 6 +- .../forms/form_wizard/form_wizard_nav.tsx | 10 +- .../components/fields/checkbox_field.tsx | 8 +- .../components/fields/combobox_field.tsx | 8 +- .../components/fields/multi_select_field.tsx | 6 +- .../forms/components/fields/numeric_field.tsx | 8 +- .../components/fields/radio_group_field.tsx | 8 +- .../forms/components/fields/range_field.tsx | 6 +- .../forms/components/fields/select_field.tsx | 8 +- .../components/fields/super_select_field.tsx | 8 +- .../components/fields/text_area_field.tsx | 8 +- .../forms/components/fields/text_field.tsx | 8 +- .../forms/components/fields/toggle_field.tsx | 8 +- .../public/finder/saved_object_finder.tsx | 14 +- .../saved_object_save_modal.test.tsx.snap | 24 +- .../save_modal/saved_object_save_modal.tsx | 34 +- .../saved_object_save_modal_origin.tsx | 8 +- .../object_view/components/field.tsx | 18 +- .../object_view/components/form.tsx | 12 +- .../saved_objects_table.test.tsx.snap | 18 +- .../__snapshots__/flyout.test.tsx.snap | 32 +- .../__snapshots__/table.test.tsx.snap | 52 +- .../objects_table/components/flyout.test.tsx | 6 +- .../objects_table/components/flyout.tsx | 22 +- .../components/import_mode_control.tsx | 4 +- .../objects_table/components/table.tsx | 33 +- .../objects_table/saved_objects_table.tsx | 26 +- .../url_panel_content.test.tsx.snap | 62 +- .../components/url_panel_content.test.tsx | 31 +- .../public/components/url_panel_content.tsx | 22 +- .../components/date_range_item.tsx | 6 +- .../components/data_tab/dropbox.tsx | 12 +- .../components/data_tab/field_bucket.tsx | 6 +- .../application/components/right_nav.tsx | 4 +- .../__snapshots__/agg.test.tsx.snap | 2 +- .../public/components/agg.tsx | 4 +- .../extended_bounds.test.tsx.snap | 6 +- .../controls/components/input_list.tsx | 4 +- .../__snapshots__/number_row.test.tsx.snap | 2 +- .../number_list/number_row.test.tsx | 2 +- .../components/number_list/number_row.tsx | 4 +- .../components/controls/date_ranges.tsx | 4 +- .../components/controls/extended_bounds.tsx | 10 +- .../public/components/controls/filter.tsx | 17 +- .../public/components/controls/ranges.tsx | 4 +- .../public/components/controls/switch.tsx | 6 +- .../components/controls/utils/agg_utils.ts | 2 +- .../public/components/sidebar/sidebar.tsx | 4 +- .../components/sidebar/sidebar_title.tsx | 4 +- .../public/markdown_options.tsx | 4 +- .../components/add_delete_buttons.test.tsx | 6 +- .../components/add_delete_buttons.tsx | 10 +- .../components/aggs/agg_select.test.tsx | 8 +- .../components/aggs/agg_select.tsx | 4 +- .../components/aggs/calculation.js | 14 +- .../components/aggs/cumulative_sum.js | 6 +- .../application/components/aggs/derivative.js | 18 +- .../components/aggs/field_select.js | 4 +- .../components/aggs/filter_ratio.js | 14 +- .../components/aggs/filter_ratio.test.js | 8 +- .../application/components/aggs/math.js | 10 +- .../components/aggs/metric_select.js | 4 +- .../components/aggs/moving_average.js | 50 +- .../application/components/aggs/percentile.js | 6 +- .../aggs/percentile_rank/multi_value_row.tsx | 4 +- .../aggs/percentile_rank/percentile_rank.tsx | 6 +- .../components/aggs/percentile_ui.js | 12 +- .../components/aggs/positive_only.js | 6 +- .../components/aggs/positive_rate.js | 14 +- .../components/aggs/serial_diff.js | 10 +- .../application/components/aggs/series_agg.js | 10 +- .../application/components/aggs/static.js | 10 +- .../application/components/aggs/std_agg.js | 6 +- .../components/aggs/std_deviation.js | 22 +- .../components/aggs/std_sibling.js | 22 +- .../application/components/aggs/top_hit.js | 28 +- .../application/components/aggs/vars.js | 4 +- .../components/annotations_editor.js | 40 +- .../application/components/color_rules.js | 8 +- .../components/data_format_picker.js | 42 +- .../__snapshots__/icon_select.test.js.snap | 4 +- .../components/icon_select/icon_select.js | 4 +- .../application/components/index_pattern.js | 36 +- .../components/panel_config/gauge.js | 32 +- .../components/panel_config/markdown.js | 10 +- .../components/panel_config/metric.js | 6 +- .../components/panel_config/table.js | 28 +- .../components/panel_config/timeseries.js | 44 +- .../components/panel_config/top_n.js | 14 +- .../application/components/series_config.js | 20 +- .../splits/__snapshots__/terms.test.js.snap | 52 +- .../components/splits/everything.js | 6 +- .../application/components/splits/filter.js | 10 +- .../components/splits/filter_items.js | 4 +- .../application/components/splits/filters.js | 6 +- .../components/splits/group_by_select.js | 4 +- .../application/components/splits/terms.js | 44 +- .../components/splits/terms.test.js | 4 + .../components/splits/unsupported_split.js | 6 +- .../components/vis_editor_visualization.js | 11 +- .../components/vis_types/gauge/series.js | 8 +- .../components/vis_types/markdown/series.js | 10 +- .../components/vis_types/metric/series.js | 8 +- .../components/vis_types/table/config.js | 26 +- .../components/vis_types/table/series.js | 8 +- .../components/vis_types/timeseries/config.js | 98 +- .../components/vis_types/timeseries/series.js | 8 +- .../components/vis_types/top_n/series.js | 8 +- .../public/application/components/yes_no.js | 6 +- .../application/components/yes_no.test.js | 4 +- .../public/components/vega_actions_menu.tsx | 9 +- .../public/components/vega_help_menu.tsx | 9 +- .../vega_inspector/components/data_viewer.tsx | 4 +- .../value_axes_panel.test.tsx.snap | 6 +- .../options/metrics_axes/value_axes_panel.tsx | 6 +- .../__snapshots__/new_vis_modal.test.tsx.snap | 54 +- .../wizard/type_selection/type_selection.tsx | 4 +- .../application/utils/get_table_columns.tsx | 6 +- .../delete_workspace_modal.test.tsx.snap | 8 +- .../delete_workspace_modal.tsx | 19 +- .../workspace_fatal_error.test.tsx.snap | 4 +- .../workspace_fatal_error.tsx | 6 +- .../select_data_source_panel.tsx | 16 +- .../workspace_form/workspace_bottom_bar.tsx | 12 +- .../workspace_create_action_panel.tsx | 10 +- .../workspace_enter_details_panel.tsx | 22 +- .../workspace_permission_setting_input.tsx | 4 +- .../workspace_permission_setting_panel.tsx | 28 +- .../workspace_form/workspace_use_case.tsx | 12 +- .../components/workspace_list/index.tsx | 6 +- .../workspace_menu/workspace_menu.tsx | 17 +- src/test_utils/public/testbed/types.ts | 10 +- .../apps/dashboard/dashboard_saved_query.js | 2 +- .../plugins/osd_tp_run_pipeline/package.json | 2 +- .../osd_sample_panel_action/package.json | 2 +- .../osd_tp_custom_visualizations/package.json | 2 +- .../self_changing_editor.tsx | 8 +- yarn.lock | 109 +-- 339 files changed, 4563 insertions(+), 4049 deletions(-) diff --git a/package.json b/package.json index 92a4d23b9100..b90aa1f3b246 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "dependencies": { "@aws-crypto/client-node": "^3.1.1", "@elastic/datemath": "5.0.3", - "@elastic/eui": "npm:@opensearch-project/oui@1.5.1", + "@elastic/eui": "npm:@opensearch-project/oui@1.7.0", "@elastic/good": "^9.0.1-kibana3", "@elastic/numeral": "npm:@amoo-miki/numeral@2.6.0", "@elastic/request-crypto": "2.0.0", diff --git a/packages/osd-plugin-generator/template/public/components/app.tsx.ejs b/packages/osd-plugin-generator/template/public/components/app.tsx.ejs index 876b3f8c5e75..2029a69dd8db 100644 --- a/packages/osd-plugin-generator/template/public/components/app.tsx.ejs +++ b/packages/osd-plugin-generator/template/public/components/app.tsx.ejs @@ -4,7 +4,7 @@ import { FormattedMessage, I18nProvider } from '@osd/i18n/react'; import { BrowserRouter as Router } from 'react-router-dom'; import { -EuiButton, +EuiSmallButton, EuiHorizontalRule, EuiPage, EuiPageBody, diff --git a/packages/osd-ui-framework/package.json b/packages/osd-ui-framework/package.json index 68b2950369dd..860a50d39c49 100644 --- a/packages/osd-ui-framework/package.json +++ b/packages/osd-ui-framework/package.json @@ -23,7 +23,7 @@ "enzyme-adapter-react-16": "^1.9.1" }, "devDependencies": { - "@elastic/eui": "npm:@opensearch-project/oui@1.5.1", + "@elastic/eui": "npm:@opensearch-project/oui@1.7.0", "@osd/babel-preset": "1.0.0", "@osd/optimizer": "1.0.0", "comment-stripper": "^0.0.4", diff --git a/packages/osd-ui-shared-deps/package.json b/packages/osd-ui-shared-deps/package.json index bc1a256a9bc9..1d4092f7df5e 100644 --- a/packages/osd-ui-shared-deps/package.json +++ b/packages/osd-ui-shared-deps/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@elastic/charts": "31.1.0", - "@elastic/eui": "npm:@opensearch-project/oui@1.5.1", + "@elastic/eui": "npm:@opensearch-project/oui@1.7.0", "@elastic/numeral": "npm:@amoo-miki/numeral@2.6.0", "@opensearch/datemath": "5.0.3", "@osd/i18n": "1.0.0", diff --git a/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap b/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap index 2165a2112f24..5fd679baf7e3 100644 --- a/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap +++ b/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap @@ -18,7 +18,7 @@ exports[`FatalErrorsScreen rendering render matches snapshot 1`] = ` - , - , + @@ -39,7 +39,7 @@ exports[`FatalErrorsScreen rendering render matches snapshot 1`] = ` id="core.fatalErrors.goBackButtonLabel" values={Object {}} /> - , + , ] } body={ diff --git a/src/core/public/fatal_errors/fatal_errors_screen.tsx b/src/core/public/fatal_errors/fatal_errors_screen.tsx index ecb95f3217e3..2333bf006813 100644 --- a/src/core/public/fatal_errors/fatal_errors_screen.tsx +++ b/src/core/public/fatal_errors/fatal_errors_screen.tsx @@ -29,8 +29,8 @@ */ import { - EuiButton, - EuiButtonEmpty, + EuiSmallButton, + EuiSmallButtonEmpty, EuiCallOut, EuiCodeBlock, EuiEmptyPrompt, @@ -125,7 +125,7 @@ export class FatalErrorsScreen extends React.Component { } actions={[ - { id="core.fatalErrors.clearYourSessionButtonLabel" defaultMessage="Clear your session" /> - , - + , + - , + , ]} /> {this.state.errors.map((error, i) => ( diff --git a/src/core/public/notifications/toasts/error_toast.tsx b/src/core/public/notifications/toasts/error_toast.tsx index 4f4debbb28c6..5924543b8eb5 100644 --- a/src/core/public/notifications/toasts/error_toast.tsx +++ b/src/core/public/notifications/toasts/error_toast.tsx @@ -32,6 +32,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { + EuiSmallButton, EuiButton, EuiCallOut, EuiCodeBlock, @@ -107,12 +108,12 @@ function showErrorDialog({ )} - modal.close()} fill> + modal.close()} fill> - + diff --git a/src/plugins/advanced_settings/public/management_app/components/field/__snapshots__/field.test.tsx.snap b/src/plugins/advanced_settings/public/management_app/components/field/__snapshots__/field.test.tsx.snap index 9ab66e07807d..0e08b53cc28d 100644 --- a/src/plugins/advanced_settings/public/management_app/components/field/__snapshots__/field.test.tsx.snap +++ b/src/plugins/advanced_settings/public/management_app/components/field/__snapshots__/field.test.tsx.snap @@ -28,10 +28,10 @@ exports[`Field for array setting should render as read only if saving is disable } > - - - + `; @@ -101,10 +101,10 @@ exports[`Field for array setting should render as read only with help text if ov } > - - - + `; @@ -173,10 +173,10 @@ exports[`Field for array setting should render custom setting icon if it is cust } > - - - + `; @@ -224,10 +224,10 @@ exports[`Field for array setting should render default value if there is no user } > - - - + `; @@ -292,10 +292,10 @@ exports[`Field for array setting should render unsaved value if there are unsave } > - - - + `; @@ -377,10 +377,10 @@ exports[`Field for array setting should render user value if there is user value } > - - - + `; @@ -445,10 +445,10 @@ exports[`Field for boolean setting should render as read only if saving is disab } > - - - + `; @@ -524,10 +524,10 @@ exports[`Field for boolean setting should render as read only with help text if } > - - - + `; @@ -602,10 +602,10 @@ exports[`Field for boolean setting should render custom setting icon if it is cu } > - - - + `; @@ -659,10 +659,10 @@ exports[`Field for boolean setting should render default value if there is no us } > - - - + `; @@ -733,10 +733,10 @@ exports[`Field for boolean setting should render unsaved value if there are unsa } > - - - + `; @@ -820,10 +820,10 @@ exports[`Field for boolean setting should render user value if there is user val } > - - - + `; @@ -894,10 +894,10 @@ exports[`Field for image setting should render as read only if saving is disable } > - - - + `; @@ -970,10 +970,10 @@ exports[`Field for image setting should render as read only with help text if ov } > - - + `; @@ -1040,10 +1040,10 @@ exports[`Field for image setting should render custom setting icon if it is cust } > - - - + `; @@ -1094,10 +1094,10 @@ exports[`Field for image setting should render default value if there is no user } > - - - + `; @@ -1165,10 +1165,10 @@ exports[`Field for image setting should render unsaved value if there are unsave } > - - - + `; @@ -1248,10 +1248,10 @@ exports[`Field for image setting should render user value if there is user value } > - - + `; @@ -1352,10 +1352,10 @@ exports[`Field for json setting should render as read only if saving is disabled } > -
- + `; @@ -1448,10 +1448,10 @@ exports[`Field for json setting should render as read only with help text if ove } > -
- + `; @@ -1540,10 +1540,10 @@ exports[`Field for json setting should render custom setting icon if it is custo } > -
- + `; @@ -1636,10 +1636,10 @@ exports[`Field for json setting should render default value if there is no user } > -
- + `; @@ -1741,10 +1741,10 @@ exports[`Field for json setting should render unsaved value if there are unsaved } > - - + `; @@ -1849,10 +1849,10 @@ exports[`Field for json setting should render user value if there is user value } > - - + `; @@ -1937,10 +1937,10 @@ exports[`Field for markdown setting should render as read only if saving is disa } > - - + `; @@ -2030,10 +2030,10 @@ exports[`Field for markdown setting should render as read only with help text if } > - - + `; @@ -2122,10 +2122,10 @@ exports[`Field for markdown setting should render custom setting icon if it is c } > - - + `; @@ -2193,10 +2193,10 @@ exports[`Field for markdown setting should render default value if there is no u } > - - + `; @@ -2281,10 +2281,10 @@ exports[`Field for markdown setting should render unsaved value if there are uns } > - - + `; @@ -2382,10 +2382,10 @@ exports[`Field for markdown setting should render user value if there is user va } > - - + `; @@ -2470,10 +2470,10 @@ exports[`Field for number setting should render as read only if saving is disabl } > - - - + `; @@ -2543,10 +2543,10 @@ exports[`Field for number setting should render as read only with help text if o } > - - - + `; @@ -2615,10 +2615,10 @@ exports[`Field for number setting should render custom setting icon if it is cus } > - - - + `; @@ -2666,10 +2666,10 @@ exports[`Field for number setting should render default value if there is no use } > - - - + `; @@ -2734,10 +2734,10 @@ exports[`Field for number setting should render unsaved value if there are unsav } > - - - + `; @@ -2815,10 +2815,10 @@ exports[`Field for number setting should render user value if there is user valu } > - - - + `; @@ -2883,10 +2883,10 @@ exports[`Field for select setting should render as read only if saving is disabl } > - - - + `; @@ -2972,10 +2972,10 @@ exports[`Field for select setting should render as read only with help text if o } > - - - + `; @@ -3060,10 +3060,10 @@ exports[`Field for select setting should render custom setting icon if it is cus } > - - - + `; @@ -3127,10 +3127,10 @@ exports[`Field for select setting should render default value if there is no use } > - - - + `; @@ -3211,10 +3211,10 @@ exports[`Field for select setting should render unsaved value if there are unsav } > - - - + `; @@ -3308,10 +3308,10 @@ exports[`Field for select setting should render user value if there is user valu } > - - - + `; @@ -3392,10 +3392,10 @@ exports[`Field for string setting should render as read only if saving is disabl } > - - - + `; @@ -3465,10 +3465,10 @@ exports[`Field for string setting should render as read only with help text if o } > - - - + `; @@ -3537,10 +3537,10 @@ exports[`Field for string setting should render custom setting icon if it is cus } > - - - + `; @@ -3588,10 +3588,10 @@ exports[`Field for string setting should render default value if there is no use } > - - - + `; @@ -3656,10 +3656,10 @@ exports[`Field for string setting should render unsaved value if there are unsav } > - - - + `; @@ -3737,10 +3737,10 @@ exports[`Field for string setting should render user value if there is user valu } > - - - + `; @@ -3805,10 +3805,10 @@ exports[`Field for stringWithValidation setting should render as read only if sa } > - - - + `; @@ -3878,10 +3878,10 @@ exports[`Field for stringWithValidation setting should render as read only with } > - - - + `; @@ -3950,10 +3950,10 @@ exports[`Field for stringWithValidation setting should render custom setting ico } > - - - + `; @@ -4001,10 +4001,10 @@ exports[`Field for stringWithValidation setting should render default value if t } > - - - + `; @@ -4069,10 +4069,10 @@ exports[`Field for stringWithValidation setting should render unsaved value if t } > - - - + `; @@ -4150,10 +4150,10 @@ exports[`Field for stringWithValidation setting should render user value if ther } > - - - + `; diff --git a/src/plugins/advanced_settings/public/management_app/components/field/field.tsx b/src/plugins/advanced_settings/public/management_app/components/field/field.tsx index c21c81cafa28..75dd18fffde4 100644 --- a/src/plugins/advanced_settings/public/management_app/components/field/field.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/field/field.tsx @@ -42,17 +42,17 @@ import { EuiScreenReaderOnly, EuiCodeEditor, EuiDescribedFormGroup, - EuiFieldNumber, - EuiFieldText, - EuiFilePicker, - EuiFormRow, + EuiCompressedFieldNumber, + EuiCompressedFieldText, + EuiCompressedFilePicker, + EuiCompressedFormRow, EuiIconTip, EuiImage, EuiLink, EuiSpacer, EuiText, - EuiSelect, - EuiSwitch, + EuiCompressedSelect, + EuiCompressedSwitch, EuiSwitchEvent, EuiToolTip, } from '@elastic/eui'; @@ -100,7 +100,7 @@ export const getEditableValue = ( }; export class Field extends PureComponent { - private changeImageForm = React.createRef(); + private changeImageForm = React.createRef(); getDisplayedDefaultValue( type: UiSettingsType, @@ -326,7 +326,7 @@ export class Field extends PureComponent { switch (type) { case 'boolean': return ( - @@ -373,7 +373,7 @@ export class Field extends PureComponent { return ; } else { return ( - { } case 'select': return ( - { @@ -404,7 +404,7 @@ export class Field extends PureComponent { ); case 'number': return ( - { ); default: return ( - { description={this.renderDescription(setting)} fullWidth > - { )} - + ); } diff --git a/src/plugins/console/public/application/components/__snapshots__/import_flyout.test.tsx.snap b/src/plugins/console/public/application/components/__snapshots__/import_flyout.test.tsx.snap index bac6be2733fd..04bb8ddcff99 100644 --- a/src/plugins/console/public/application/components/__snapshots__/import_flyout.test.tsx.snap +++ b/src/plugins/console/public/application/components/__snapshots__/import_flyout.test.tsx.snap @@ -61,9 +61,9 @@ exports[`ImportFlyout Component renders correctly 1`] = `
-
-
- +
- - +
- -
- -
+
+ -
- -
-
- -
+
+ +
+ + -
- -
-
-
- + +
+ +
+
+
+ +
- +
diff --git a/src/plugins/console/public/application/components/__snapshots__/import_mode_control.test.tsx.snap b/src/plugins/console/public/application/components/__snapshots__/import_mode_control.test.tsx.snap index 343c6b351229..29e14c2c986d 100644 --- a/src/plugins/console/public/application/components/__snapshots__/import_mode_control.test.tsx.snap +++ b/src/plugins/console/public/application/components/__snapshots__/import_mode_control.test.tsx.snap @@ -14,7 +14,7 @@ exports[`ImportModeControl Component should render correclty 1`] = ` } } > - { return ( - { /> } > - { onChange={setImportFile} data-test-subj="queryFilePicker" /> - - +
+ setImportMode(newValues)} /> -
+ ); }; diff --git a/src/plugins/console/public/application/components/import_mode_control.test.tsx b/src/plugins/console/public/application/components/import_mode_control.test.tsx index 219cc2f1c5fc..32ab6322d7eb 100644 --- a/src/plugins/console/public/application/components/import_mode_control.test.tsx +++ b/src/plugins/console/public/application/components/import_mode_control.test.tsx @@ -10,7 +10,7 @@ import { nextTick, shallowWithIntl } from 'test_utils/enzyme_helpers'; import { ImportModeControl } from './import_mode_control'; import { EuiFormLegendProps, EuiRadioGroupProps } from '@elastic/eui'; -const radioGroupIdentifier = 'EuiRadioGroup'; +const radioGroupIdentifier = 'EuiCompressedRadioGroup'; describe('ImportModeControl Component', () => { let component: ShallowWrapper, React.Component<{}, {}, any>>; diff --git a/src/plugins/console/public/application/components/import_mode_control.tsx b/src/plugins/console/public/application/components/import_mode_control.tsx index 0b543a9c593c..603a37f51fa9 100644 --- a/src/plugins/console/public/application/components/import_mode_control.tsx +++ b/src/plugins/console/public/application/components/import_mode_control.tsx @@ -4,7 +4,7 @@ */ import React, { useState } from 'react'; -import { EuiFormFieldset, EuiTitle, EuiRadioGroup } from '@elastic/eui'; +import { EuiFormFieldset, EuiTitle, EuiCompressedRadioGroup } from '@elastic/eui'; import { i18n } from '@osd/i18n'; export interface ImportModeControlProps { @@ -43,7 +43,7 @@ export const ImportModeControl = ({ initialValues, updateSelection }: ImportMode }; const overwriteRadio = ( - onChange({ overwrite: id === overwriteEnabled.id })} diff --git a/src/plugins/console/public/application/components/settings_modal.tsx b/src/plugins/console/public/application/components/settings_modal.tsx index 15405a7e6c7e..d97b7c72a03f 100644 --- a/src/plugins/console/public/application/components/settings_modal.tsx +++ b/src/plugins/console/public/application/components/settings_modal.tsx @@ -34,17 +34,17 @@ import { i18n } from '@osd/i18n'; import { FormattedMessage } from '@osd/i18n/react'; import { - EuiButton, - EuiButtonEmpty, - EuiFieldNumber, - EuiFormRow, - EuiCheckboxGroup, + EuiSmallButton, + EuiSmallButtonEmpty, + EuiCompressedFieldNumber, + EuiCompressedFormRow, + EuiCompressedCheckboxGroup, EuiModal, EuiModalBody, EuiModalFooter, EuiModalHeader, EuiModalHeaderTitle, - EuiSwitch, + EuiCompressedSwitch, } from '@elastic/eui'; import { DevToolsSettings } from '../../services'; @@ -122,7 +122,7 @@ export function DevToolsSettingsModal(props: Props) { const pollingFields = fields || indices || templates ? ( - } > - setPolling(e.target.checked)} /> - + - { @@ -167,7 +167,7 @@ export function DevToolsSettingsModal(props: Props) { defaultMessage="Refresh autocomplete suggestions" id="console.settingsPage.refreshButtonLabel" /> - + ) : undefined; @@ -184,12 +184,12 @@ export function DevToolsSettingsModal(props: Props) { - } > - - + - - + setWrapMode(e.target.checked)} /> - + - } > - setTripleQuotes(e.target.checked)} /> - + - } > - { const { stateSetter, ...rest } = opts; return rest; @@ -259,19 +259,19 @@ export function DevToolsSettingsModal(props: Props) { onAutocompleteChange(e as AutocompleteOptions); }} /> - + {pollingFields} - + - + - + - + ); diff --git a/src/plugins/console/public/application/components/something_went_wrong_callout.tsx b/src/plugins/console/public/application/components/something_went_wrong_callout.tsx index f12d5b9cda88..b868164e5c8e 100644 --- a/src/plugins/console/public/application/components/something_went_wrong_callout.tsx +++ b/src/plugins/console/public/application/components/something_went_wrong_callout.tsx @@ -31,7 +31,7 @@ import React, { FunctionComponent, useEffect } from 'react'; import { FormattedMessage } from '@osd/i18n/react'; import { i18n } from '@osd/i18n'; -import { EuiCallOut, EuiText, EuiButton, EuiSpacer } from '@elastic/eui'; +import { EuiCallOut, EuiText, EuiSmallButton, EuiSpacer } from '@elastic/eui'; interface Props { error: Error; @@ -61,9 +61,9 @@ export const SomethingWentWrongCallout: FunctionComponent = ({ error, onB

- onButtonClick()}> + onButtonClick()}> - + ); }; diff --git a/src/plugins/console/public/application/components/welcome_panel.tsx b/src/plugins/console/public/application/components/welcome_panel.tsx index bc30539e57c1..ba9e499b03bb 100644 --- a/src/plugins/console/public/application/components/welcome_panel.tsx +++ b/src/plugins/console/public/application/components/welcome_panel.tsx @@ -37,7 +37,7 @@ import { EuiFlyoutHeader, EuiFlyoutBody, EuiTitle, - EuiButton, + EuiSmallButton, EuiText, EuiFlyoutFooter, } from '@elastic/eui'; @@ -131,14 +131,14 @@ export function WelcomePanel(props: Props) { - - + ); diff --git a/src/plugins/console/public/application/containers/console_history/console_history.tsx b/src/plugins/console/public/application/containers/console_history/console_history.tsx index 08704c442bbc..925224c53783 100644 --- a/src/plugins/console/public/application/containers/console_history/console_history.tsx +++ b/src/plugins/console/public/application/containers/console_history/console_history.tsx @@ -39,8 +39,8 @@ import { EuiTitle, EuiFlexItem, EuiFlexGroup, - EuiButtonEmpty, - EuiButton, + EuiSmallButtonEmpty, + EuiSmallButton, } from '@elastic/eui'; import { useServicesContext } from '../../contexts'; @@ -210,25 +210,25 @@ export function ConsoleHistory({ close }: Props) { - clear()}> + clear()}> {i18n.translate('console.historyPage.clearHistoryButtonLabel', { defaultMessage: 'Clear', })} - + - close()}> + close()}> {i18n.translate('console.historyPage.closehistoryButtonLabel', { defaultMessage: 'Close', })} - + - restoreRequestFromHistory(selectedReq.current)} @@ -236,7 +236,7 @@ export function ConsoleHistory({ close }: Props) { {i18n.translate('console.historyPage.applyHistoryButtonLabel', { defaultMessage: 'Apply', })} - + diff --git a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/create_button.test.tsx.snap b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/create_button.test.tsx.snap index 4512135a4927..1ca3fd80e890 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/create_button.test.tsx.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/create_button.test.tsx.snap @@ -245,7 +245,7 @@ exports[`create button with props renders button dropdown menu when two provider - + } closePopover={[Function]} display="inlineBlock" @@ -274,79 +274,89 @@ exports[`create button with props renders button dropdown menu when two provider
- - - - - + + + + +
@@ -480,78 +490,87 @@ exports[`create button with props renders single button when one provider given diff --git a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap index 1726e357eebf..678ddcaf5743 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap @@ -2309,7 +2309,7 @@ exports[`dashboard listing render table listing with initial filters from URL 1` noItemsFragment={ - + } body={ @@ -3560,7 +3560,7 @@ exports[`dashboard listing renders call to action when no dashboards exist 1`] = noItemsFragment={ - + } body={ @@ -4811,7 +4811,7 @@ exports[`dashboard listing renders table rows 1`] = ` noItemsFragment={ - + } body={ @@ -6062,7 +6062,7 @@ exports[`dashboard listing renders warning when listingLimit is exceeded 1`] = ` noItemsFragment={ - + } body={ diff --git a/src/plugins/dashboard/public/application/components/dashboard_listing/create_button.tsx b/src/plugins/dashboard/public/application/components/dashboard_listing/create_button.tsx index 5baf945e3b5f..83f055b0ac39 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_listing/create_button.tsx +++ b/src/plugins/dashboard/public/application/components/dashboard_listing/create_button.tsx @@ -5,7 +5,7 @@ import React, { useState } from 'react'; import { FormattedMessage } from '@osd/i18n/react'; import { - EuiButton, + EuiSmallButton, EuiContextMenuItem, EuiContextMenuPanel, EuiFlexItem, @@ -47,7 +47,7 @@ const CreateButton = (props: CreateButtonProps) => { const renderCreateMenuDropDown = () => { const button = ( - { data-test-subj="createMenuDropdown" > - + ); return ( @@ -78,10 +78,15 @@ const CreateButton = (props: CreateButtonProps) => { const provider: DashboardProvider = Object.values(props.dashboardProviders!)[0]; return ( - +  {provider.createLinkText} - + ); }; diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap index 1ea30b7fe0a6..559f69752b6e 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap @@ -34,7 +34,7 @@ exports[`renders DashboardCloneModal 1`] = `

- - @@ -53,8 +53,8 @@ exports[`renders DashboardCloneModal 1`] = ` id="dashboard.topNav.cloneModal.cancelButtonLabel" values={Object {}} /> - - + - + `; diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/save_modal.test.js.snap b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/save_modal.test.js.snap index bc4ed477d9ee..727dae147a96 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/save_modal.test.js.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/save_modal.test.js.snap @@ -7,9 +7,9 @@ exports[`renders DashboardSaveModal 1`] = ` onSave={[Function]} options={ - - - - + - - + } showCopyOnSave={true} diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx index fb1aefab7760..c4e2b2d32651 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx @@ -33,9 +33,9 @@ import { i18n } from '@osd/i18n'; import { FormattedMessage } from '@osd/i18n/react'; import { - EuiButton, - EuiButtonEmpty, - EuiFieldText, + EuiSmallButton, + EuiSmallButtonEmpty, + EuiCompressedFieldText, EuiModal, EuiModalBody, EuiModalFooter, @@ -191,7 +191,7 @@ export class DashboardCloneModal extends React.Component { - { - + - + - { id="dashboard.topNav.cloneModal.confirmButtonLabel" defaultMessage="Confirm Clone" /> - + ); diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/options.tsx b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/options.tsx index 2ea2c6f841f6..02534e06e62c 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/options.tsx +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/options.tsx @@ -31,7 +31,7 @@ import React, { Component } from 'react'; import { i18n } from '@osd/i18n'; -import { EuiForm, EuiFormRow, EuiSwitch } from '@elastic/eui'; +import { EuiForm, EuiCompressedFormRow, EuiCompressedSwitch } from '@elastic/eui'; interface Props { useMargins: boolean; @@ -70,8 +70,8 @@ export class OptionsMenu extends Component { render() { return ( - - + { onChange={this.handleUseMarginsChange} data-test-subj="dashboardMarginsCheckbox" /> - + - - + { onChange={this.handleHidePanelTitlesChange} data-test-subj="dashboardPanelTitlesCheckbox" /> - + ); } diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/save_modal.tsx b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/save_modal.tsx index f8e0fe674df8..3a8aa0538bba 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/save_modal.tsx +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/save_modal.tsx @@ -30,7 +30,7 @@ import React, { Fragment } from 'react'; import { FormattedMessage } from '@osd/i18n/react'; -import { EuiFormRow, EuiTextArea, EuiSwitch } from '@elastic/eui'; +import { EuiCompressedFormRow, EuiCompressedTextArea, EuiCompressedSwitch } from '@elastic/eui'; import { SavedObjectSaveModal } from '../../../../../../saved_objects/public'; @@ -110,7 +110,7 @@ export class DashboardSaveModal extends React.Component { renderDashboardSaveOptions() { return ( - { /> } > - - + - { /> } > - { /> } /> - + ); } diff --git a/src/plugins/dashboard/public/application/utils/get_nav_actions.tsx b/src/plugins/dashboard/public/application/utils/get_nav_actions.tsx index 205489739eab..32bfef083518 100644 --- a/src/plugins/dashboard/public/application/utils/get_nav_actions.tsx +++ b/src/plugins/dashboard/public/application/utils/get_nav_actions.tsx @@ -5,7 +5,7 @@ import React, { ReactElement, useState } from 'react'; import { i18n } from '@osd/i18n'; -import { EUI_MODAL_CANCEL_BUTTON, EuiCheckboxGroup } from '@elastic/eui'; +import { EUI_MODAL_CANCEL_BUTTON, EuiCompressedCheckboxGroup } from '@elastic/eui'; import { EuiCheckboxGroupIdToSelectedMap } from '@elastic/eui/src/components/form/checkbox/checkbox_group'; import { SaveResult, @@ -265,7 +265,7 @@ export const getNavActions = ( }; return ( - } actions={ - - + } /> ); diff --git a/src/plugins/data/public/data_sources/datasource_selector/data_selector_refresher.tsx b/src/plugins/data/public/data_sources/datasource_selector/data_selector_refresher.tsx index 1cc5acd6f9de..bab5f1524584 100644 --- a/src/plugins/data/public/data_sources/datasource_selector/data_selector_refresher.tsx +++ b/src/plugins/data/public/data_sources/datasource_selector/data_selector_refresher.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { i18n } from '@osd/i18n'; import { - EuiButtonIcon, + EuiSmallButtonIcon, EuiButtonIconProps, EuiText, EuiToolTip, @@ -33,7 +33,7 @@ export const DataSelectorRefresher: React.FC = Reac data-test-subj="sourceRefreshButtonToolTip" {...toolTipProps} > - const form = ( {mappedFilters.map((filter, i) => ( - - + this.toggleFilterSelected(i)} /> - + ))} ); @@ -115,18 +116,18 @@ export default class ApplyFiltersPopoverContent extends Component {form} - + - - + + - +
); diff --git a/src/plugins/data/public/ui/filter_bar/filter_editor/generic_combo_box.tsx b/src/plugins/data/public/ui/filter_bar/filter_editor/generic_combo_box.tsx index 2df1b1e7c15b..59c906e2bb19 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_editor/generic_combo_box.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_editor/generic_combo_box.tsx @@ -28,7 +28,7 @@ * under the License. */ -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiCompressedComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; import React from 'react'; export interface GenericComboBoxProps { @@ -66,7 +66,7 @@ export function GenericComboBox(props: GenericComboBoxProps) { }; return ( - { - { {this.state.useCustomLabel && (
- - - +
)} @@ -181,7 +182,7 @@ class FilterEditorUI extends Component { - { id="data.filter.filterEditor.saveButtonLabel" defaultMessage="Save" /> - + - { id="data.filter.filterEditor.cancelButtonLabel" defaultMessage="Cancel" /> - + @@ -231,7 +232,7 @@ class FilterEditorUI extends Component { return ( - { isClearable={false} data-test-subj="filterIndexPatternsSelect" /> - + ); @@ -276,7 +277,7 @@ class FilterEditorUI extends Component { const fields = selectedIndexPattern ? getFilterableFields(selectedIndexPattern) : []; return ( - { className="globalFilterEditor__fieldInput" data-test-subj="filterFieldSuggestionList" /> - + ); } @@ -307,7 +308,7 @@ class FilterEditorUI extends Component { const { selectedField, selectedOperator } = this.state; const operators = selectedField ? getOperatorOptions(selectedField) : []; return ( - { isClearable={false} data-test-subj="filterOperatorList" /> - + ); } private renderCustomEditor() { return ( - { width="100%" height="250px" /> - + ); } diff --git a/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_value_input.tsx b/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_value_input.tsx index 624f478821db..74dcfa493b5f 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_value_input.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_editor/phrase_value_input.tsx @@ -28,7 +28,7 @@ * under the License. */ -import { EuiFormRow } from '@elastic/eui'; +import { EuiCompressedFormRow } from '@elastic/eui'; import { InjectedIntl, injectI18n } from '@osd/i18n/react'; import { uniq } from 'lodash'; import React from 'react'; @@ -46,7 +46,7 @@ interface Props extends PhraseSuggestorProps { class PhraseValueInputUI extends PhraseSuggestorUI { public render() { return ( - { type={this.props.field ? this.props.field.type : 'string'} /> )} - + ); } diff --git a/src/plugins/data/public/ui/filter_bar/filter_editor/phrases_values_input.tsx b/src/plugins/data/public/ui/filter_bar/filter_editor/phrases_values_input.tsx index 0ac1af97a1cd..1e9e80012378 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_editor/phrases_values_input.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_editor/phrases_values_input.tsx @@ -28,7 +28,7 @@ * under the License. */ -import { EuiFormRow } from '@elastic/eui'; +import { EuiCompressedFormRow } from '@elastic/eui'; import { InjectedIntl, injectI18n } from '@osd/i18n/react'; import { uniq } from 'lodash'; import React from 'react'; @@ -48,7 +48,7 @@ class PhrasesValuesInputUI extends PhraseSuggestorUI { const { values, intl, onChange } = this.props; const options = values ? uniq([...values, ...suggestions]) : suggestions; return ( - { data-test-subj="filterParamsComboBox phrasesParamsComboxBox" delimiter="," /> - + ); } } diff --git a/src/plugins/data/public/ui/filter_bar/filter_editor/value_input_type.tsx b/src/plugins/data/public/ui/filter_bar/filter_editor/value_input_type.tsx index 1bd1a653e027..9d7709a5f667 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_editor/value_input_type.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_editor/value_input_type.tsx @@ -28,7 +28,11 @@ * under the License. */ -import { EuiFieldNumber, EuiFieldText, EuiSelect } from '@elastic/eui'; +import { + EuiCompressedFieldNumber, + EuiCompressedFieldText, + EuiCompressedSelect, +} from '@elastic/eui'; import { InjectedIntl, injectI18n } from '@osd/i18n/react'; import { isEmpty } from 'lodash'; import React, { Component } from 'react'; @@ -53,7 +57,7 @@ class ValueInputTypeUI extends Component { switch (this.props.type) { case 'string': inputElement = ( - { break; case 'number': inputElement = ( - { break; case 'date': inputElement = ( - { break; case 'ip': inputElement = ( - { break; case 'boolean': inputElement = ( - { isOpen={this.state.isPopoverOpen} closePopover={this.closePopover} button={ - { }, }) ); - const euiComboBox = component.find(EuiComboBox); + const euiComboBox = component.find(EuiCompressedComboBox); expect(euiComboBox.prop('selectedOptions')).toEqual( expect.arrayContaining([ { @@ -72,7 +72,7 @@ describe('LanguageSelector', () => { }, }) ); - const euiComboBox = component.find(EuiComboBox); + const euiComboBox = component.find(EuiCompressedComboBox); expect(euiComboBox.prop('selectedOptions')).toEqual( expect.arrayContaining([ { diff --git a/src/plugins/data/public/ui/query_editor/language_selector.tsx b/src/plugins/data/public/ui/query_editor/language_selector.tsx index 7ea82fe2b24e..0f35b84ff599 100644 --- a/src/plugins/data/public/ui/query_editor/language_selector.tsx +++ b/src/plugins/data/public/ui/query_editor/language_selector.tsx @@ -3,7 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiComboBox, EuiComboBoxOptionOption, PopoverAnchorPosition } from '@elastic/eui'; +import { + EuiCompressedComboBox, + EuiComboBoxOptionOption, + PopoverAnchorPosition, +} from '@elastic/eui'; import { i18n } from '@osd/i18n'; import React from 'react'; import { getUiService } from '../../services'; @@ -73,7 +77,7 @@ export const QueryLanguageSelector = (props: Props) => { uiService.Settings.setUserQueryLanguage(props.language); return ( - ; dataSource?: DataSource; isLoading?: boolean; - prepend?: React.ComponentProps['prepend']; + prepend?: React.ComponentProps['prepend']; showQueryEditor?: boolean; showDatePicker?: boolean; dateRangeFrom?: string; diff --git a/src/plugins/data/public/ui/query_string_input/language_switcher.tsx b/src/plugins/data/public/ui/query_string_input/language_switcher.tsx index d9c398acb639..c31a40db8ddb 100644 --- a/src/plugins/data/public/ui/query_string_input/language_switcher.tsx +++ b/src/plugins/data/public/ui/query_string_input/language_switcher.tsx @@ -32,12 +32,12 @@ import { i18n } from '@osd/i18n'; import { EuiButtonEmpty, EuiForm, - EuiFormRow, + EuiCompressedFormRow, EuiLink, EuiPopover, EuiPopoverTitle, EuiSpacer, - EuiSwitch, + EuiCompressedSwitch, EuiText, PopoverAnchorPosition, } from '@elastic/eui'; @@ -122,8 +122,8 @@ export function QueryLanguageSwitcher(props: Props) { - - + - +
diff --git a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx index c0ec95325a71..72b28830652b 100644 --- a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx @@ -39,7 +39,7 @@ import { EuiFlexItem, EuiLink, EuiSuperDatePicker, - EuiFieldText, + EuiCompressedFieldText, prettyDuration, } from '@elastic/eui'; // @ts-ignore @@ -70,7 +70,7 @@ export interface QueryBarTopRowProps { screenTitle?: string; indexPatterns?: Array; isLoading?: boolean; - prepend?: React.ComponentProps['prepend']; + prepend?: React.ComponentProps['prepend']; showQueryInput?: boolean; showDatePicker?: boolean; dateRangeFrom?: string; diff --git a/src/plugins/data/public/ui/query_string_input/query_string_input.tsx b/src/plugins/data/public/ui/query_string_input/query_string_input.tsx index b2750e855b0f..dbbaad9cc3d2 100644 --- a/src/plugins/data/public/ui/query_string_input/query_string_input.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_string_input.tsx @@ -33,7 +33,7 @@ import { i18n } from '@osd/i18n'; import classNames from 'classnames'; import { - EuiTextArea, + EuiCompressedTextArea, EuiOutsideClickDetector, PopoverAnchorPosition, EuiFlexGroup, @@ -642,7 +642,7 @@ export default class QueryStringInputUI extends Component { className="euiFormControlLayout__childrenWrapper osdQueryBar__textareaWrap" ref={this.queryBarInputDivRefInstance} > - { isInvalid={this.props.isInvalid} > {this.getQueryString()} - + - + {savedQueryDescriptionText} - - + - - + - - { @@ -195,10 +195,10 @@ export function SaveQueryForm({ }} data-test-subj="saveQueryFormDescription" /> - + {showFilterOption && ( - - + - + )} {showTimeFilterOption && ( - - + - + )} ); @@ -247,13 +247,13 @@ export function SaveQueryForm({ {saveQueryForm} - + {i18n.translate('data.search.searchBar.savedQueryFormCancelButtonText', { defaultMessage: 'Cancel', })} - + - + ); diff --git a/src/plugins/data/public/ui/saved_query_management/saved_query_management_component.tsx b/src/plugins/data/public/ui/saved_query_management/saved_query_management_component.tsx index da7c25254adb..77643ac6413d 100644 --- a/src/plugins/data/public/ui/saved_query_management/saved_query_management_component.tsx +++ b/src/plugins/data/public/ui/saved_query_management/saved_query_management_component.tsx @@ -32,6 +32,7 @@ import { EuiPopover, EuiPopoverTitle, EuiPopoverFooter, + EuiSmallButtonEmpty, EuiButtonEmpty, EuiButton, EuiFlexGroup, @@ -171,7 +172,7 @@ export function SavedQueryManagementComponent({ }; const savedQueryPopoverButton = ( - - + ); const savedQueryRows = () => { diff --git a/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap b/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap index f7f3d1c1fbd0..ef9d1f0fb923 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap +++ b/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap @@ -173,7 +173,7 @@ exports[`ShardFailureModal renders matching snapshot given valid properties 1`] > - - + `; diff --git a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_modal.tsx b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_modal.tsx index 6c7ff95f29f8..f4b7d1fd0980 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_modal.tsx +++ b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_modal.tsx @@ -35,12 +35,12 @@ import { EuiCodeBlock, EuiTabbedContent, EuiCopy, - EuiButton, + EuiSmallButton, EuiModalBody, EuiModalHeader, EuiModalHeaderTitle, EuiModalFooter, - EuiButtonEmpty, + EuiSmallButtonEmpty, EuiCallOut, } from '@elastic/eui'; import { SearchResponse } from 'elasticsearch'; @@ -121,21 +121,21 @@ export function ShardFailureModal({ request, response, title, onClose }: Props) {(copy) => ( - + - + )} - onClose()} fill data-test-sub="closeShardFailureModal"> + onClose()} fill data-test-sub="closeShardFailureModal"> - + ); diff --git a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_table.tsx b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_table.tsx index 2414a4095910..057a17c4a523 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_table.tsx +++ b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_table.tsx @@ -30,7 +30,7 @@ import React, { useState, ReactElement } from 'react'; // @ts-ignore -import { EuiInMemoryTable, EuiButtonIcon } from '@elastic/eui'; +import { EuiInMemoryTable, EuiSmallButtonIcon } from '@elastic/eui'; // @ts-ignore import { RIGHT_ALIGNMENT } from '@elastic/eui/lib/services'; import { i18n } from '@osd/i18n'; @@ -74,7 +74,7 @@ export function ShardFailureTable({ failures }: { failures: ShardFailure[] }) { ); return ( - { // toggle displaying the expanded view of the given list item const map = Object.assign({}, expandMap); diff --git a/src/plugins/data_source_management/public/components/create_button/__snapshots__/create_button.test.tsx.snap b/src/plugins/data_source_management/public/components/create_button/__snapshots__/create_button.test.tsx.snap index f0e2965c6678..03c20a8093ee 100644 --- a/src/plugins/data_source_management/public/components/create_button/__snapshots__/create_button.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/create_button/__snapshots__/create_button.test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreateButton should render normally 1`] = ` - - + `; diff --git a/src/plugins/data_source_management/public/components/create_button/create_button.tsx b/src/plugins/data_source_management/public/components/create_button/create_button.tsx index 7c893af0209d..303379a0c890 100644 --- a/src/plugins/data_source_management/public/components/create_button/create_button.tsx +++ b/src/plugins/data_source_management/public/components/create_button/create_button.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { History } from 'history'; -import { EuiButton } from '@elastic/eui'; +import { EuiSmallButton } from '@elastic/eui'; import { FormattedMessage } from '@osd/i18n/react'; interface Props { @@ -17,7 +17,7 @@ interface Props { export const CreateButton = ({ history, isEmptyState, dataTestSubj }: Props) => { return ( - history.push('/create')} @@ -26,6 +26,6 @@ export const CreateButton = ({ history, isEmptyState, dataTestSubj }: Props) => id="dataSourcesManagement.dataSourceListing.createButton" defaultMessage="Create data source connection" /> - + ); }; diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap index 2bb1bd8053d7..be2a18192fe9 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Datasource Management: Create Datasource form with different authType configurations should render normally with all authMethod combinations 1`] = ` -