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

Remove AOSS options from the data source selector #2016

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/apps/configuration/top-nav-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
: undefined,
onSelectedDataSources: wrapSetDataSourceWithUpdateUrl,
fullWidth: true,
dataSourceFilter: (ds) => ds.attributes.auth.credentials?.service !== 'aoss',

Check warning on line 62 in public/apps/configuration/top-nav-menu.tsx

View check run for this annotation

Codecov / codecov/patch

public/apps/configuration/top-nav-menu.tsx#L62

Added line #L62 was not covered by tests
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the possible values for service?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are 'aoss', or 'es', but good call out here. I pulled it from core as a constant since it is available. https://github.com/opensearch-project/OpenSearch-Dashboards/blob/a2ee3629040c71bcf1d5d02a0c110703b4e5ca44/src/plugins/data_source/common/data_sources/types.ts#L50

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we flip this around and only show datasource that is OpenSearch? Will there be other types of datasources in the future?

@RyanL1997 perhaps you know if other datasource types will be added in a future release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually cannot import the constant as core does not export it. I will create an issue to do that, but reverted the change for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes ideally we will add more types of datasources in the future. (cc @derek-ho @cwperks )

}}
/>
) : null;
Expand Down
Loading