Skip to content

Commit

Permalink
empty state but missing data set selector button
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Oct 19, 2024
1 parent bd785d4 commit 9ca559a
Show file tree
Hide file tree
Showing 17 changed files with 169 additions and 343 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export type EnsureDefaultIndexPattern = () => Promise<unknown | void> | undefine

export const createEnsureDefaultIndexPattern = (
uiSettings: UiSettingsCommon,
onRedirectNoIndexPattern: () => Promise<unknown> | void,
onNoIndexPattern: () => Promise<unknown> | void
onRedirectNoIndexPattern: () => Promise<unknown> | void
) => {
/**
* Checks whether a default index pattern is set and exists and defines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ interface IndexPatternsServiceDeps {
onNotification: OnNotification;
onError: OnError;
onRedirectNoIndexPattern?: () => void;
onNoIndexPattern?: () => void;
onUnsupportedTimePattern: OnUnsupportedTimePattern;
}

Expand All @@ -97,7 +96,6 @@ export class IndexPatternsService {
onError,
onUnsupportedTimePattern,
onRedirectNoIndexPattern = () => {},
onNoIndexPattern = () => {},
}: IndexPatternsServiceDeps) {
this.apiClient = apiClient;
this.config = uiSettings;
Expand All @@ -108,8 +106,7 @@ export class IndexPatternsService {
this.onUnsupportedTimePattern = onUnsupportedTimePattern;
this.ensureDefaultIndexPattern = createEnsureDefaultIndexPattern(
uiSettings,
onRedirectNoIndexPattern,
onNoIndexPattern
onRedirectNoIndexPattern
);
}

Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/public/index_patterns/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export {
flattenHitWrapper,
formatHitProvider,
onRedirectNoIndexPattern,
onNoIndexPattern,
onUnsupportedTimePattern,
} from './index_patterns';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@

export * from '../../../common/index_patterns/index_patterns';
export * from './redirect_no_index_pattern';
export * from './on_no_index_pattern';
export * from './on_unsupported_time_pattern';
export * from './index_patterns_api_client';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export const getDQLLanguageConfig = (
visualizable: true,
},
showDocLinks: true,
docLink: {
title: i18n.translate('data.dqlLanguage.docLink', {
defaultMessage: 'DQL documentation',
}),
url: 'https://opensearch.org/docs/latest/query-dsl/full-text/query-string/',
},
editorSupportedAppNames: ['discover'],
supportedAppNames: ['discover', 'dashboards', 'visualize', 'data-explorer', 'vis-builder', '*'],
sampleQueries: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export const getLuceneLanguageConfig = (
visualizable: true,
},
showDocLinks: true,
docLink: {
title: i18n.translate('data.luceneLanguage.docLink', {
defaultMessage: 'Lucene documentation',
}),
url: 'https://opensearch.org/docs/latest/query-dsl/full-text/query-string/',
},
editorSupportedAppNames: ['discover'],
supportedAppNames: ['discover', 'dashboards', 'visualize', 'data-explorer', 'vis-builder', '*'],
sampleQueries: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export interface LanguageConfig {
visualizable?: boolean;
};
showDocLinks?: boolean;
docLink?: {
title: string;
url: string;
};
editorSupportedAppNames?: string[];
supportedAppNames?: string[];
hideDatePicker?: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/public/ui/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import "./common";
@import "./filter_bar/index";
@import "./typeahead/index";
@import "./saved_query_management/index";
Expand Down
5 changes: 2 additions & 3 deletions src/plugins/data/public/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

export { UiEnhancements, IUiStart, IUiSetup } from './types';
export { IUiStart, IUiSetup } from './types';
export { IndexPatternSelectProps } from './index_pattern_select';
export { FilterLabel } from './filter_bar';
export { QueryStringInput, QueryStringInputProps } from './query_string_input';
Expand All @@ -51,5 +51,4 @@ export {
useQueryStringManager,
} from './search_bar';
export { SuggestionsComponent } from './typeahead';
export { DatasetSelector, AdvancedSelector, DatasetSelectorAppearance } from './dataset_selector';
export { NoIndexPatternsPanel } from './no_index_patterns';
export { DatasetSelector, DatasetSelectorAppearance } from './dataset_selector';
6 changes: 0 additions & 6 deletions src/plugins/data/public/ui/no_index_patterns/index.ts

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9ca559a

Please sign in to comment.