-
Notifications
You must be signed in to change notification settings - Fork 913
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 <[email protected]>
Signed-off-by: Eric <[email protected]>
…a plugin Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
…ncements Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
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 <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
Signed-off-by: Eric <[email protected]>
* initial commit for datasource Signed-off-by: Eric <[email protected]> * initial commit for datasource service Signed-off-by: Eric <[email protected]> * [Data Sources] Move datasource codebase from datasource plugin to data plugin Signed-off-by: Eric <[email protected]> * [Data Sources] Add datasource factory Signed-off-by: Eric <[email protected]> * datasource service Signed-off-by: Eric <[email protected]> * datasource with factory Signed-off-by: Eric <[email protected]> * datasource selector Signed-off-by: Eric <[email protected]> * exposes datasources from data plugin Signed-off-by: Eric <[email protected]> * index pattern datasource registration Signed-off-by: Eric <[email protected]> * add datasource selector to discover Signed-off-by: Eric <[email protected]> * remove unused files Signed-off-by: Eric <[email protected]> * add/exposes types for datasources as a set of services Signed-off-by: Eric <[email protected]> * add datasource selector unit tests Signed-off-by: Eric <[email protected]> * add metadata to selectable Signed-off-by: Eric <[email protected]> * redirection to observability for non-index-pattern datasource Signed-off-by: Eric <[email protected]> * add datasource factory tests Signed-off-by: Eric <[email protected]> * add datasource service test Signed-off-by: Eric <[email protected]> * datasources related fixes Signed-off-by: Eric <[email protected]> * add tests for datasource selectable Signed-off-by: Eric <[email protected]> * added types/interfaces for sidebar selector, and add a couple of enhancements Signed-off-by: Eric <[email protected]> * remove pill effect Signed-off-by: Eric <[email protected]> * change type for name display in selector for index patterns Signed-off-by: Eric <[email protected]> * remove legacy index selector Signed-off-by: Eric <[email protected]> * rename datasource change handler Signed-off-by: Eric <[email protected]> * remove unused constants Signed-off-by: Eric <[email protected]> * fix a redirection bug Signed-off-by: Eric <[email protected]> * add to change log Signed-off-by: Eric <[email protected]> * fix bg color issue in source selector Signed-off-by: Eric <[email protected]> * address oui and missing guard Signed-off-by: Eric <[email protected]> * add test subj Signed-off-by: Eric <[email protected]> * i18 and datasource interface default return Signed-off-by: Eric <[email protected]> * add default datasource tests Signed-off-by: Eric <[email protected]> * fix typo Signed-off-by: Eric <[email protected]> * modify wording Signed-off-by: Eric <[email protected]> * add experimental annotation to datasource Signed-off-by: Eric <[email protected]> * add type datasource filtering to remove type error hint Signed-off-by: Eric <[email protected]> * remove unused type Signed-off-by: Eric <[email protected]> * add 'type' to option type Signed-off-by: Eric <[email protected]> * Type fixes Signed-off-by: Ashwin P Chandran <[email protected]> * cherry-pick type changes from remote and add partial fixes Signed-off-by: Eric <[email protected]> * add one type exports Signed-off-by: Eric <[email protected]> * remaining type errors fixed Signed-off-by: Ashwin P Chandran <[email protected]> * addressing comments Signed-off-by: Eric <[email protected]> * address dedup Signed-off-by: Eric <[email protected]> * refactor datasource_selectable to address comments Signed-off-by: Joshua Li <[email protected]> * remove unnecessary optional chaining Signed-off-by: Joshua Li <[email protected]> * refactor variable names Signed-off-by: Joshua Li <[email protected]> * move functnions out of selectable component Signed-off-by: Eric <[email protected]> * add comments for dedup/options list updates Signed-off-by: Eric <[email protected]> * add experimental annotation Signed-off-by: Eric <[email protected]> * callback and experimental annotation on types Signed-off-by: Eric <[email protected]> * handleSourceSelection callback Signed-off-by: Eric <[email protected]> * datasource annotation and import adjustment Signed-off-by: Eric <[email protected]> * remove pill effect Signed-off-by: Eric <[email protected]> * minor changes addressing latest comments Signed-off-by: Eric <[email protected]> * remove unused tests Signed-off-by: Eric <[email protected]> --------- Signed-off-by: Eric <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Signed-off-by: Joshua Li <[email protected]> Co-authored-by: Josh Romero <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]> Co-authored-by: Joshua Li <[email protected]> (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 <[email protected]> * initial commit for datasource service Signed-off-by: Eric <[email protected]> * [Data Sources] Move datasource codebase from datasource plugin to data plugin Signed-off-by: Eric <[email protected]> * [Data Sources] Add datasource factory Signed-off-by: Eric <[email protected]> * datasource service Signed-off-by: Eric <[email protected]> * datasource with factory Signed-off-by: Eric <[email protected]> * datasource selector Signed-off-by: Eric <[email protected]> * exposes datasources from data plugin Signed-off-by: Eric <[email protected]> * index pattern datasource registration Signed-off-by: Eric <[email protected]> * add datasource selector to discover Signed-off-by: Eric <[email protected]> * remove unused files Signed-off-by: Eric <[email protected]> * add/exposes types for datasources as a set of services Signed-off-by: Eric <[email protected]> * add datasource selector unit tests Signed-off-by: Eric <[email protected]> * add metadata to selectable Signed-off-by: Eric <[email protected]> * redirection to observability for non-index-pattern datasource Signed-off-by: Eric <[email protected]> * add datasource factory tests Signed-off-by: Eric <[email protected]> * add datasource service test Signed-off-by: Eric <[email protected]> * datasources related fixes Signed-off-by: Eric <[email protected]> * add tests for datasource selectable Signed-off-by: Eric <[email protected]> * added types/interfaces for sidebar selector, and add a couple of enhancements Signed-off-by: Eric <[email protected]> * remove pill effect Signed-off-by: Eric <[email protected]> * change type for name display in selector for index patterns Signed-off-by: Eric <[email protected]> * remove legacy index selector Signed-off-by: Eric <[email protected]> * rename datasource change handler Signed-off-by: Eric <[email protected]> * remove unused constants Signed-off-by: Eric <[email protected]> * fix a redirection bug Signed-off-by: Eric <[email protected]> * add to change log Signed-off-by: Eric <[email protected]> * fix bg color issue in source selector Signed-off-by: Eric <[email protected]> * address oui and missing guard Signed-off-by: Eric <[email protected]> * add test subj Signed-off-by: Eric <[email protected]> * i18 and datasource interface default return Signed-off-by: Eric <[email protected]> * add default datasource tests Signed-off-by: Eric <[email protected]> * fix typo Signed-off-by: Eric <[email protected]> * modify wording Signed-off-by: Eric <[email protected]> * add experimental annotation to datasource Signed-off-by: Eric <[email protected]> * add type datasource filtering to remove type error hint Signed-off-by: Eric <[email protected]> * remove unused type Signed-off-by: Eric <[email protected]> * add 'type' to option type Signed-off-by: Eric <[email protected]> * Type fixes Signed-off-by: Ashwin P Chandran <[email protected]> * cherry-pick type changes from remote and add partial fixes Signed-off-by: Eric <[email protected]> * add one type exports Signed-off-by: Eric <[email protected]> * remaining type errors fixed Signed-off-by: Ashwin P Chandran <[email protected]> * addressing comments Signed-off-by: Eric <[email protected]> * address dedup Signed-off-by: Eric <[email protected]> * refactor datasource_selectable to address comments Signed-off-by: Joshua Li <[email protected]> * remove unnecessary optional chaining Signed-off-by: Joshua Li <[email protected]> * refactor variable names Signed-off-by: Joshua Li <[email protected]> * move functnions out of selectable component Signed-off-by: Eric <[email protected]> * add comments for dedup/options list updates Signed-off-by: Eric <[email protected]> * add experimental annotation Signed-off-by: Eric <[email protected]> * callback and experimental annotation on types Signed-off-by: Eric <[email protected]> * handleSourceSelection callback Signed-off-by: Eric <[email protected]> * datasource annotation and import adjustment Signed-off-by: Eric <[email protected]> * remove pill effect Signed-off-by: Eric <[email protected]> * minor changes addressing latest comments Signed-off-by: Eric <[email protected]> * remove unused tests Signed-off-by: Eric <[email protected]> --------- Signed-off-by: Eric <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Signed-off-by: Joshua Li <[email protected]> Co-authored-by: Josh Romero <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]> Co-authored-by: Joshua Li <[email protected]> (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 <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Signed-off-by: Joshua Li <[email protected]> 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 <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]> Co-authored-by: Joshua Li <[email protected]>
* 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 <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Signed-off-by: Joshua Li <[email protected]> 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 <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]> Co-authored-by: Joshua Li <[email protected]>
…ject#5167) * initial commit for datasource Signed-off-by: Eric <[email protected]> * initial commit for datasource service Signed-off-by: Eric <[email protected]> * [Data Sources] Move datasource codebase from datasource plugin to data plugin Signed-off-by: Eric <[email protected]> * [Data Sources] Add datasource factory Signed-off-by: Eric <[email protected]> * datasource service Signed-off-by: Eric <[email protected]> * datasource with factory Signed-off-by: Eric <[email protected]> * datasource selector Signed-off-by: Eric <[email protected]> * exposes datasources from data plugin Signed-off-by: Eric <[email protected]> * index pattern datasource registration Signed-off-by: Eric <[email protected]> * add datasource selector to discover Signed-off-by: Eric <[email protected]> * remove unused files Signed-off-by: Eric <[email protected]> * add/exposes types for datasources as a set of services Signed-off-by: Eric <[email protected]> * add datasource selector unit tests Signed-off-by: Eric <[email protected]> * add metadata to selectable Signed-off-by: Eric <[email protected]> * redirection to observability for non-index-pattern datasource Signed-off-by: Eric <[email protected]> * add datasource factory tests Signed-off-by: Eric <[email protected]> * add datasource service test Signed-off-by: Eric <[email protected]> * datasources related fixes Signed-off-by: Eric <[email protected]> * add tests for datasource selectable Signed-off-by: Eric <[email protected]> * added types/interfaces for sidebar selector, and add a couple of enhancements Signed-off-by: Eric <[email protected]> * remove pill effect Signed-off-by: Eric <[email protected]> * change type for name display in selector for index patterns Signed-off-by: Eric <[email protected]> * remove legacy index selector Signed-off-by: Eric <[email protected]> * rename datasource change handler Signed-off-by: Eric <[email protected]> * remove unused constants Signed-off-by: Eric <[email protected]> * fix a redirection bug Signed-off-by: Eric <[email protected]> * add to change log Signed-off-by: Eric <[email protected]> * fix bg color issue in source selector Signed-off-by: Eric <[email protected]> * address oui and missing guard Signed-off-by: Eric <[email protected]> * add test subj Signed-off-by: Eric <[email protected]> * i18 and datasource interface default return Signed-off-by: Eric <[email protected]> * add default datasource tests Signed-off-by: Eric <[email protected]> * fix typo Signed-off-by: Eric <[email protected]> * modify wording Signed-off-by: Eric <[email protected]> * add experimental annotation to datasource Signed-off-by: Eric <[email protected]> * add type datasource filtering to remove type error hint Signed-off-by: Eric <[email protected]> * remove unused type Signed-off-by: Eric <[email protected]> * add 'type' to option type Signed-off-by: Eric <[email protected]> * Type fixes Signed-off-by: Ashwin P Chandran <[email protected]> * cherry-pick type changes from remote and add partial fixes Signed-off-by: Eric <[email protected]> * add one type exports Signed-off-by: Eric <[email protected]> * remaining type errors fixed Signed-off-by: Ashwin P Chandran <[email protected]> * addressing comments Signed-off-by: Eric <[email protected]> * address dedup Signed-off-by: Eric <[email protected]> * refactor datasource_selectable to address comments Signed-off-by: Joshua Li <[email protected]> * remove unnecessary optional chaining Signed-off-by: Joshua Li <[email protected]> * refactor variable names Signed-off-by: Joshua Li <[email protected]> * move functnions out of selectable component Signed-off-by: Eric <[email protected]> * add comments for dedup/options list updates Signed-off-by: Eric <[email protected]> * add experimental annotation Signed-off-by: Eric <[email protected]> * callback and experimental annotation on types Signed-off-by: Eric <[email protected]> * handleSourceSelection callback Signed-off-by: Eric <[email protected]> * datasource annotation and import adjustment Signed-off-by: Eric <[email protected]> * remove pill effect Signed-off-by: Eric <[email protected]> * minor changes addressing latest comments Signed-off-by: Eric <[email protected]> * remove unused tests Signed-off-by: Eric <[email protected]> --------- Signed-off-by: Eric <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Signed-off-by: Joshua Li <[email protected]> Co-authored-by: Josh Romero <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]> Co-authored-by: Joshua Li <[email protected]>
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