-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Datasource selector of multiple datasources #5167
[Feature] Datasource selector of multiple datasources #5167
Conversation
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
…a plugin Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
…ncements Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last experimental label was missed, the rest look good.
const ip = dataSet as IndexPatternOption; | ||
return { | ||
...optionContent, | ||
label: ip.title, | ||
value: ip.id, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
const ip = dataSet as IndexPatternOption; | |
return { | |
...optionContent, | |
label: ip.title, | |
value: ip.id, | |
}; | |
return { | |
...optionContent, | |
label: dataSet.title, | |
value: dataSet.id, | |
}; |
onDataSourceSelect, | ||
setDataSourceOptionList, | ||
onGetDataSetError, // onGetDataSetError, Callback for handling get data set errors. Ensure it's memoized. | ||
singleSelection = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
singleSelection = true, | |
singleSelection = { asPlainText: true }, |
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
* initial commit for datasource Signed-off-by: Eric <menwe@amazon.com> * initial commit for datasource service Signed-off-by: Eric <menwe@amazon.com> * [Data Sources] Move datasource codebase from datasource plugin to data plugin Signed-off-by: Eric <menwe@amazon.com> * [Data Sources] Add datasource factory Signed-off-by: Eric <menwe@amazon.com> * datasource service Signed-off-by: Eric <menwe@amazon.com> * datasource with factory Signed-off-by: Eric <menwe@amazon.com> * datasource selector Signed-off-by: Eric <menwe@amazon.com> * exposes datasources from data plugin Signed-off-by: Eric <menwe@amazon.com> * index pattern datasource registration Signed-off-by: Eric <menwe@amazon.com> * add datasource selector to discover Signed-off-by: Eric <menwe@amazon.com> * remove unused files Signed-off-by: Eric <menwe@amazon.com> * add/exposes types for datasources as a set of services Signed-off-by: Eric <menwe@amazon.com> * add datasource selector unit tests Signed-off-by: Eric <menwe@amazon.com> * add metadata to selectable Signed-off-by: Eric <menwe@amazon.com> * redirection to observability for non-index-pattern datasource Signed-off-by: Eric <menwe@amazon.com> * add datasource factory tests Signed-off-by: Eric <menwe@amazon.com> * add datasource service test Signed-off-by: Eric <menwe@amazon.com> * datasources related fixes Signed-off-by: Eric <menwe@amazon.com> * add tests for datasource selectable Signed-off-by: Eric <menwe@amazon.com> * added types/interfaces for sidebar selector, and add a couple of enhancements Signed-off-by: Eric <menwe@amazon.com> * remove pill effect Signed-off-by: Eric <menwe@amazon.com> * change type for name display in selector for index patterns Signed-off-by: Eric <menwe@amazon.com> * remove legacy index selector Signed-off-by: Eric <menwe@amazon.com> * rename datasource change handler Signed-off-by: Eric <menwe@amazon.com> * remove unused constants Signed-off-by: Eric <menwe@amazon.com> * fix a redirection bug Signed-off-by: Eric <menwe@amazon.com> * add to change log Signed-off-by: Eric <menwe@amazon.com> * fix bg color issue in source selector Signed-off-by: Eric <menwe@amazon.com> * address oui and missing guard Signed-off-by: Eric <menwe@amazon.com> * add test subj Signed-off-by: Eric <menwe@amazon.com> * i18 and datasource interface default return Signed-off-by: Eric <menwe@amazon.com> * add default datasource tests Signed-off-by: Eric <menwe@amazon.com> * fix typo Signed-off-by: Eric <menwe@amazon.com> * modify wording Signed-off-by: Eric <menwe@amazon.com> * add experimental annotation to datasource Signed-off-by: Eric <menwe@amazon.com> * add type datasource filtering to remove type error hint Signed-off-by: Eric <menwe@amazon.com> * remove unused type Signed-off-by: Eric <menwe@amazon.com> * add 'type' to option type Signed-off-by: Eric <menwe@amazon.com> * Type fixes Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cherry-pick type changes from remote and add partial fixes Signed-off-by: Eric <menwe@amazon.com> * add one type exports Signed-off-by: Eric <menwe@amazon.com> * remaining type errors fixed Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * addressing comments Signed-off-by: Eric <menwe@amazon.com> * address dedup Signed-off-by: Eric <menwe@amazon.com> * refactor datasource_selectable to address comments Signed-off-by: Joshua Li <joshuali925@gmail.com> * remove unnecessary optional chaining Signed-off-by: Joshua Li <joshuali925@gmail.com> * refactor variable names Signed-off-by: Joshua Li <joshuali925@gmail.com> * move functnions out of selectable component Signed-off-by: Eric <menwe@amazon.com> * add comments for dedup/options list updates Signed-off-by: Eric <menwe@amazon.com> * add experimental annotation Signed-off-by: Eric <menwe@amazon.com> * callback and experimental annotation on types Signed-off-by: Eric <menwe@amazon.com> * handleSourceSelection callback Signed-off-by: Eric <menwe@amazon.com> * datasource annotation and import adjustment Signed-off-by: Eric <menwe@amazon.com> * remove pill effect Signed-off-by: Eric <menwe@amazon.com> * minor changes addressing latest comments Signed-off-by: Eric <menwe@amazon.com> * remove unused tests Signed-off-by: Eric <menwe@amazon.com> --------- Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com> (cherry picked from commit 1e980fa) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* initial commit for datasource Signed-off-by: Eric <menwe@amazon.com> * initial commit for datasource service Signed-off-by: Eric <menwe@amazon.com> * [Data Sources] Move datasource codebase from datasource plugin to data plugin Signed-off-by: Eric <menwe@amazon.com> * [Data Sources] Add datasource factory Signed-off-by: Eric <menwe@amazon.com> * datasource service Signed-off-by: Eric <menwe@amazon.com> * datasource with factory Signed-off-by: Eric <menwe@amazon.com> * datasource selector Signed-off-by: Eric <menwe@amazon.com> * exposes datasources from data plugin Signed-off-by: Eric <menwe@amazon.com> * index pattern datasource registration Signed-off-by: Eric <menwe@amazon.com> * add datasource selector to discover Signed-off-by: Eric <menwe@amazon.com> * remove unused files Signed-off-by: Eric <menwe@amazon.com> * add/exposes types for datasources as a set of services Signed-off-by: Eric <menwe@amazon.com> * add datasource selector unit tests Signed-off-by: Eric <menwe@amazon.com> * add metadata to selectable Signed-off-by: Eric <menwe@amazon.com> * redirection to observability for non-index-pattern datasource Signed-off-by: Eric <menwe@amazon.com> * add datasource factory tests Signed-off-by: Eric <menwe@amazon.com> * add datasource service test Signed-off-by: Eric <menwe@amazon.com> * datasources related fixes Signed-off-by: Eric <menwe@amazon.com> * add tests for datasource selectable Signed-off-by: Eric <menwe@amazon.com> * added types/interfaces for sidebar selector, and add a couple of enhancements Signed-off-by: Eric <menwe@amazon.com> * remove pill effect Signed-off-by: Eric <menwe@amazon.com> * change type for name display in selector for index patterns Signed-off-by: Eric <menwe@amazon.com> * remove legacy index selector Signed-off-by: Eric <menwe@amazon.com> * rename datasource change handler Signed-off-by: Eric <menwe@amazon.com> * remove unused constants Signed-off-by: Eric <menwe@amazon.com> * fix a redirection bug Signed-off-by: Eric <menwe@amazon.com> * add to change log Signed-off-by: Eric <menwe@amazon.com> * fix bg color issue in source selector Signed-off-by: Eric <menwe@amazon.com> * address oui and missing guard Signed-off-by: Eric <menwe@amazon.com> * add test subj Signed-off-by: Eric <menwe@amazon.com> * i18 and datasource interface default return Signed-off-by: Eric <menwe@amazon.com> * add default datasource tests Signed-off-by: Eric <menwe@amazon.com> * fix typo Signed-off-by: Eric <menwe@amazon.com> * modify wording Signed-off-by: Eric <menwe@amazon.com> * add experimental annotation to datasource Signed-off-by: Eric <menwe@amazon.com> * add type datasource filtering to remove type error hint Signed-off-by: Eric <menwe@amazon.com> * remove unused type Signed-off-by: Eric <menwe@amazon.com> * add 'type' to option type Signed-off-by: Eric <menwe@amazon.com> * Type fixes Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cherry-pick type changes from remote and add partial fixes Signed-off-by: Eric <menwe@amazon.com> * add one type exports Signed-off-by: Eric <menwe@amazon.com> * remaining type errors fixed Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * addressing comments Signed-off-by: Eric <menwe@amazon.com> * address dedup Signed-off-by: Eric <menwe@amazon.com> * refactor datasource_selectable to address comments Signed-off-by: Joshua Li <joshuali925@gmail.com> * remove unnecessary optional chaining Signed-off-by: Joshua Li <joshuali925@gmail.com> * refactor variable names Signed-off-by: Joshua Li <joshuali925@gmail.com> * move functnions out of selectable component Signed-off-by: Eric <menwe@amazon.com> * add comments for dedup/options list updates Signed-off-by: Eric <menwe@amazon.com> * add experimental annotation Signed-off-by: Eric <menwe@amazon.com> * callback and experimental annotation on types Signed-off-by: Eric <menwe@amazon.com> * handleSourceSelection callback Signed-off-by: Eric <menwe@amazon.com> * datasource annotation and import adjustment Signed-off-by: Eric <menwe@amazon.com> * remove pill effect Signed-off-by: Eric <menwe@amazon.com> * minor changes addressing latest comments Signed-off-by: Eric <menwe@amazon.com> * remove unused tests Signed-off-by: Eric <menwe@amazon.com> --------- Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com> (cherry picked from commit 1e980fa) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* initial commit for datasource * initial commit for datasource service * [Data Sources] Move datasource codebase from datasource plugin to data plugin * [Data Sources] Add datasource factory * datasource service * datasource with factory * datasource selector * exposes datasources from data plugin * index pattern datasource registration * add datasource selector to discover * remove unused files * add/exposes types for datasources as a set of services * add datasource selector unit tests * add metadata to selectable * redirection to observability for non-index-pattern datasource * add datasource factory tests * add datasource service test * datasources related fixes * add tests for datasource selectable * added types/interfaces for sidebar selector, and add a couple of enhancements * remove pill effect * change type for name display in selector for index patterns * remove legacy index selector * rename datasource change handler * remove unused constants * fix a redirection bug * add to change log * fix bg color issue in source selector * address oui and missing guard * add test subj * i18 and datasource interface default return * add default datasource tests * fix typo * modify wording * add experimental annotation to datasource * add type datasource filtering to remove type error hint * remove unused type * add 'type' to option type * Type fixes * cherry-pick type changes from remote and add partial fixes * add one type exports * remaining type errors fixed * addressing comments * address dedup * refactor datasource_selectable to address comments * remove unnecessary optional chaining * refactor variable names * move functnions out of selectable component * add comments for dedup/options list updates * add experimental annotation * callback and experimental annotation on types * handleSourceSelection callback * datasource annotation and import adjustment * remove pill effect * minor changes addressing latest comments * remove unused tests --------- (cherry picked from commit 1e980fa) Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com>
* initial commit for datasource * initial commit for datasource service * [Data Sources] Move datasource codebase from datasource plugin to data plugin * [Data Sources] Add datasource factory * datasource service * datasource with factory * datasource selector * exposes datasources from data plugin * index pattern datasource registration * add datasource selector to discover * remove unused files * add/exposes types for datasources as a set of services * add datasource selector unit tests * add metadata to selectable * redirection to observability for non-index-pattern datasource * add datasource factory tests * add datasource service test * datasources related fixes * add tests for datasource selectable * added types/interfaces for sidebar selector, and add a couple of enhancements * remove pill effect * change type for name display in selector for index patterns * remove legacy index selector * rename datasource change handler * remove unused constants * fix a redirection bug * add to change log * fix bg color issue in source selector * address oui and missing guard * add test subj * i18 and datasource interface default return * add default datasource tests * fix typo * modify wording * add experimental annotation to datasource * add type datasource filtering to remove type error hint * remove unused type * add 'type' to option type * Type fixes * cherry-pick type changes from remote and add partial fixes * add one type exports * remaining type errors fixed * addressing comments * address dedup * refactor datasource_selectable to address comments * remove unnecessary optional chaining * refactor variable names * move functnions out of selectable component * add comments for dedup/options list updates * add experimental annotation * callback and experimental annotation on types * handleSourceSelection callback * datasource annotation and import adjustment * remove pill effect * minor changes addressing latest comments * remove unused tests --------- (cherry picked from commit 1e980fa) Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com>
…ject#5167) * initial commit for datasource Signed-off-by: Eric <menwe@amazon.com> * initial commit for datasource service Signed-off-by: Eric <menwe@amazon.com> * [Data Sources] Move datasource codebase from datasource plugin to data plugin Signed-off-by: Eric <menwe@amazon.com> * [Data Sources] Add datasource factory Signed-off-by: Eric <menwe@amazon.com> * datasource service Signed-off-by: Eric <menwe@amazon.com> * datasource with factory Signed-off-by: Eric <menwe@amazon.com> * datasource selector Signed-off-by: Eric <menwe@amazon.com> * exposes datasources from data plugin Signed-off-by: Eric <menwe@amazon.com> * index pattern datasource registration Signed-off-by: Eric <menwe@amazon.com> * add datasource selector to discover Signed-off-by: Eric <menwe@amazon.com> * remove unused files Signed-off-by: Eric <menwe@amazon.com> * add/exposes types for datasources as a set of services Signed-off-by: Eric <menwe@amazon.com> * add datasource selector unit tests Signed-off-by: Eric <menwe@amazon.com> * add metadata to selectable Signed-off-by: Eric <menwe@amazon.com> * redirection to observability for non-index-pattern datasource Signed-off-by: Eric <menwe@amazon.com> * add datasource factory tests Signed-off-by: Eric <menwe@amazon.com> * add datasource service test Signed-off-by: Eric <menwe@amazon.com> * datasources related fixes Signed-off-by: Eric <menwe@amazon.com> * add tests for datasource selectable Signed-off-by: Eric <menwe@amazon.com> * added types/interfaces for sidebar selector, and add a couple of enhancements Signed-off-by: Eric <menwe@amazon.com> * remove pill effect Signed-off-by: Eric <menwe@amazon.com> * change type for name display in selector for index patterns Signed-off-by: Eric <menwe@amazon.com> * remove legacy index selector Signed-off-by: Eric <menwe@amazon.com> * rename datasource change handler Signed-off-by: Eric <menwe@amazon.com> * remove unused constants Signed-off-by: Eric <menwe@amazon.com> * fix a redirection bug Signed-off-by: Eric <menwe@amazon.com> * add to change log Signed-off-by: Eric <menwe@amazon.com> * fix bg color issue in source selector Signed-off-by: Eric <menwe@amazon.com> * address oui and missing guard Signed-off-by: Eric <menwe@amazon.com> * add test subj Signed-off-by: Eric <menwe@amazon.com> * i18 and datasource interface default return Signed-off-by: Eric <menwe@amazon.com> * add default datasource tests Signed-off-by: Eric <menwe@amazon.com> * fix typo Signed-off-by: Eric <menwe@amazon.com> * modify wording Signed-off-by: Eric <menwe@amazon.com> * add experimental annotation to datasource Signed-off-by: Eric <menwe@amazon.com> * add type datasource filtering to remove type error hint Signed-off-by: Eric <menwe@amazon.com> * remove unused type Signed-off-by: Eric <menwe@amazon.com> * add 'type' to option type Signed-off-by: Eric <menwe@amazon.com> * Type fixes Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * cherry-pick type changes from remote and add partial fixes Signed-off-by: Eric <menwe@amazon.com> * add one type exports Signed-off-by: Eric <menwe@amazon.com> * remaining type errors fixed Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * addressing comments Signed-off-by: Eric <menwe@amazon.com> * address dedup Signed-off-by: Eric <menwe@amazon.com> * refactor datasource_selectable to address comments Signed-off-by: Joshua Li <joshuali925@gmail.com> * remove unnecessary optional chaining Signed-off-by: Joshua Li <joshuali925@gmail.com> * refactor variable names Signed-off-by: Joshua Li <joshuali925@gmail.com> * move functnions out of selectable component Signed-off-by: Eric <menwe@amazon.com> * add comments for dedup/options list updates Signed-off-by: Eric <menwe@amazon.com> * add experimental annotation Signed-off-by: Eric <menwe@amazon.com> * callback and experimental annotation on types Signed-off-by: Eric <menwe@amazon.com> * handleSourceSelection callback Signed-off-by: Eric <menwe@amazon.com> * datasource annotation and import adjustment Signed-off-by: Eric <menwe@amazon.com> * remove pill effect Signed-off-by: Eric <menwe@amazon.com> * minor changes addressing latest comments Signed-off-by: Eric <menwe@amazon.com> * remove unused tests Signed-off-by: Eric <menwe@amazon.com> --------- Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: Josh Romero <rmerqg@amazon.com> Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com>
Description
Datasource selector support in OpenSearch Dashboard Discover
Issues Resolved
fixes #4482, #4991
Screenshot
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr