forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Discover] Data selector enhancement (opensearch-project#6571)
* datasource and service refactoring Signed-off-by: Eric <menwe@amazon.com> * datasource enhancement and refactoring Signed-off-by: Eric <menwe@amazon.com> * datasource selectable consolidation and refactoring Signed-off-by: Eric <menwe@amazon.com> * add in memory cache with refresh Signed-off-by: Eric <menwe@amazon.com> * move refresh to right side Signed-off-by: Eric <menwe@amazon.com> * renaming Signed-off-by: Eric <menwe@amazon.com> * update default datasource tests Signed-off-by: Eric <menwe@amazon.com> * added more tests for default datasource Signed-off-by: Eric <menwe@amazon.com> * update selector tests Signed-off-by: Eric <menwe@amazon.com> * update changelog Signed-off-by: Eric <menwe@amazon.com> * fix data source service tests Signed-off-by: Eric <menwe@amazon.com> * add and update tests for datasource service Signed-off-by: Eric <menwe@amazon.com> * add more data source service tests Signed-off-by: Eric <menwe@amazon.com> * fix sidebar tests Signed-off-by: Eric <menwe@amazon.com> * add to change log yml Signed-off-by: Eric <menwe@amazon.com> * address comments along with more tests Signed-off-by: Eric <menwe@amazon.com> * add test subject Signed-off-by: Eric <menwe@amazon.com> * reference from correct type path Signed-off-by: Eric <menwe@amazon.com> * correct text Signed-off-by: Eric <menwe@amazon.com> * minor change - remove yet used displayOrder Signed-off-by: Eric <menwe@amazon.com> * remove from changelog as having fragments already Signed-off-by: Eric <menwe@amazon.com> * use expanded name Signed-off-by: Eric <menwe@amazon.com> * fix one test Signed-off-by: Eric <menwe@amazon.com> --------- Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.com>
- Loading branch information
1 parent
765a11f
commit 1ce6533
Showing
24 changed files
with
891 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
refactor: | ||
- discover data selector enhancement and refactoring ([#6571](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6571)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { i18n } from '@osd/i18n'; | ||
import { DataSourceUIGroupType } from './datasource/types'; | ||
|
||
export const S3_GLUE_DATA_SOURCE_DISPLAY_NAME = 'Amazon S3'; | ||
export const S3_GLUE_DATA_SOURCE_TYPE = 's3glue'; | ||
export const DEFAULT_DATA_SOURCE_TYPE = 'DEFAULT_INDEX_PATTERNS'; | ||
export const DEFAULT_DATA_SOURCE_NAME = i18n.translate('data.datasource.type.openSearchDefault', { | ||
defaultMessage: 'OpenSearch Default', | ||
}); | ||
export const DEFAULT_DATA_SOURCE_DISPLAY_NAME = i18n.translate( | ||
'data.datasource.type.openSearchDefaultDisplayName', | ||
{ | ||
defaultMessage: 'Index patterns', | ||
} | ||
); | ||
|
||
export const defaultDataSourceMetadata = { | ||
ui: { | ||
label: DEFAULT_DATA_SOURCE_DISPLAY_NAME, | ||
typeLabel: DEFAULT_DATA_SOURCE_DISPLAY_NAME, | ||
groupType: DataSourceUIGroupType.defaultOpenSearchDataSource, | ||
selector: { | ||
displayDatasetsAsSource: true, | ||
}, | ||
}, | ||
}; | ||
|
||
export const s3DataSourceMetadata = { | ||
ui: { | ||
label: S3_GLUE_DATA_SOURCE_DISPLAY_NAME, | ||
typeLabel: S3_GLUE_DATA_SOURCE_TYPE, | ||
groupType: DataSourceUIGroupType.s3glue, | ||
selector: { | ||
displayDatasetsAsSource: false, | ||
}, | ||
}, | ||
}; | ||
|
||
export const DATA_SELECTOR_REFRESHER_POPOVER_TEXT = 'Refresh data selector'; | ||
export const DATA_SELECTOR_DEFAULT_PLACEHOLDER = 'Select a data source'; | ||
export const DATA_SELECTOR_S3_DATA_SOURCE_GROUP_HINT_LABEL = ' - Opens in Log Explorer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.