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

Replace http client with opensearch-js client in dev tool console #3546

Closed
zhongnansu opened this issue Mar 7, 2023 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request multiple datasource multiple datasource project v2.7.0

Comments

@zhongnansu
Copy link
Member

zhongnansu commented Mar 7, 2023

console plugin doesn't interact with OpenSearch via opensearch-js client. It's just making http requests using Node.js http client. Given that the multiple datasource solution is mostly based on opensearch-js clients, to onboard dev tool console with multiple datasource, we first need to refactor original logic to replace http client with opensearch-js client, and then extend it to use the data source client on demand.

Besides, keeping a unified way for OSD to interact with OpenSearch will benefit us long term. All visualizations/Discover retrieves data from OpenSearch through data plugin. And data plugin under the hood is using opensearch-js client. I don't see the point for OSD dev tool console using http client to interact with OpenSearch.

POC: #3544

Notes:

  • To sending request from opensaearch-js client in dev tool console with user input, we can make generic request using client.transport.request
var client = new opensearch.Client();
client.transport.request({
  path: '/_search_with_clusters',
  method: 'PUT'
}).then(console.log.bind(console));

part of #2699

@zhongnansu zhongnansu self-assigned this Mar 7, 2023
@zhongnansu zhongnansu added multiple datasource multiple datasource project v2.7.0 and removed untriaged labels Mar 7, 2023
@zhongnansu zhongnansu added the enhancement New feature or request label Mar 7, 2023
@zhongnansu zhongnansu changed the title [Multiple Datasource]Replace http client with opensearch-js client in dev tool console Replace http client with opensearch-js client in dev tool console Mar 8, 2023
@joshuarrrr
Copy link
Member

@zhongnansu Was this completely resolved by #3544? If so, let's close.

@zhongnansu
Copy link
Member Author

resolved but not merged to 2.7 branch yet

@joshuarrrr
Copy link
Member

cool - we can close then - it's already in 2.x: #3639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request multiple datasource multiple datasource project v2.7.0
Projects
None yet
Development

No branches or pull requests

2 participants