Skip to content
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

[Backport 2.x] [Feature] Datasource selector of multiple datasources #5235

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 1e980fa from #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]>
(cherry picked from commit 1e980fa)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #5235 (b24fc58) into 2.x (03bc3cc) will increase coverage by 23.05%.
The diff coverage is 57.14%.

@@             Coverage Diff             @@
##              2.x    #5235       +/-   ##
===========================================
+ Coverage   43.76%   66.81%   +23.05%     
===========================================
  Files        1552     3284     +1732     
  Lines       31286    63146    +31860     
  Branches     5911    10047     +4136     
===========================================
+ Hits        13691    42192    +28501     
- Misses      16572    18483     +1911     
- Partials     1023     2471     +1448     
Flag Coverage Δ
Linux_1 35.26% <10.75%> (?)
Linux_2 55.26% <ø> (?)
Linux_3 43.85% <57.62%> (?)
Linux_4 35.49% <10.86%> (?)
Windows_1 35.28% <10.75%> (?)
Windows_2 55.23% <ø> (?)
Windows_3 43.85% <57.62%> (+0.09%) ⬆️
Windows_4 35.49% <10.86%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../data/public/data_sources/datasource/datasource.ts 100.00% <100.00%> (ø)
...ins/data/public/data_sources/datasource/factory.ts 100.00% <100.00%> (ø)
...a/public/data_sources/datasource_services/types.ts 100.00% <100.00%> (ø)
src/plugins/data/public/index.ts 85.71% <ø> (ø)
src/plugins/discover/public/plugin.ts 0.00% <0.00%> (ø)
..._sources/datasource_services/datasource_service.ts 89.47% <89.47%> (ø)
...a_sources/default_datasource/default_datasource.ts 70.00% <70.00%> (ø)
...public/data_sources/register_default_datasource.ts 50.00% <50.00%> (ø)
src/plugins/data/public/plugin.ts 0.00% <0.00%> (ø)
...rces/datasource_selector/datasource_selectable.tsx 64.86% <64.86%> (ø)
... and 1 more

... and 2287 files with indirect coverage changes

@joshuarrrr joshuarrrr merged commit ee243f5 into 2.x Oct 6, 2023
73 of 74 checks passed
@github-actions github-actions bot deleted the backport/backport-5167-to-2.x branch October 6, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocut Skip the changelog verification check on backports first-time-contributor v2.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants