Skip to content

Commit

Permalink
updated with new comments
Browse files Browse the repository at this point in the history
Signed-off-by: sumukhswamy <[email protected]>
  • Loading branch information
sumukhswamy committed Apr 27, 2024
1 parent 856bbab commit 8de3cce
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ The OpenSearch Dashboards Query Workbench enables you to query your OpenSearch d
[cypress-test-badge]: https://img.shields.io/badge/Cypress%20tests-in%20progress-yellow
[cypress-test-link]: https://github.com/opensearch-project/opensearch-build/issues/1124
[cypress-code-badge]: https://img.shields.io/badge/Cypress%20code-blue
[cypress-code-link]: https://github.com/opensearch-project/sql/tree/main/workbench/.cypress/integration
[cypress-code-link]: https://github.com/opensearch-project/dashboards-query-workbench/tree/main/.cypress/integration

## Documentation

Please see our technical [documentation](https://opensearch.org/docs/latest/search-plugins/sql/workbench/) to learn more about its features.
Please see our technical [documentation](https://opensearch.org/docs/latest/search-plugins/sql/workbench/) to learn more about its features.


## Contributing
Expand Down
3 changes: 1 addition & 2 deletions common/utils/fetch_datasources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export const fetchDataSources = (http: CoreStart['http'], dataSourceMDSId: strin
const connectorGroups = {};

data.forEach((item) => {
const connector = item.connector;
const name = item.name;
const { connector, name } = item

if (connector === 'S3GLUE') {
if (!connectorGroups[connector]) {
Expand Down
4 changes: 2 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "queryWorkbenchDashboards",
"version": "2.12.0.0",
"opensearchDashboardsVersion": "2.12.0",
"version": "3.0.0.0",
"opensearchDashboardsVersion": "3.0.0",
"server": true,
"ui": true,
"requiredPlugins": ["navigation", "opensearchDashboardsReact", "opensearchDashboardsUtils"],
Expand Down
13 changes: 6 additions & 7 deletions public/components/Main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ interface MainState {
selectedMDSDataConnectionId: string;
cluster: string;
dataSourceOptions: DataSourceOption[];
dataConnections: boolean;
}

const SUCCESS_MESSAGE = 'Success';
Expand Down Expand Up @@ -285,7 +284,6 @@ export class Main extends React.Component<MainProps, MainState> {
cluster: 'Indexes',
dataSourceOptions: [],
selectedMDSDataConnectionId: '',
dataConnections: false,
};
this.httpClient = this.props.httpClient;
this.updateSQLQueries = _.debounce(this.updateSQLQueries, 250).bind(this);
Expand All @@ -300,10 +298,10 @@ export class Main extends React.Component<MainProps, MainState> {
href: '#',
},
]);
this.fetchDataConnections();
this.fetchFlintDataSources();
}

fetchDataConnections = () => {
fetchFlintDataSources = () => {
fetchDataSources(
this.httpClient,
this.state.selectedMDSDataConnectionId,
Expand Down Expand Up @@ -431,9 +429,9 @@ export class Main extends React.Component<MainProps, MainState> {
query = { dataSourceMDSId: this.state.selectedMDSDataConnectionId };
}
const responsePromise = Promise.all(
queries.map((payload: string) =>
queries.map((eachQuery: string) =>
this.httpClient
.post(endpoint, { body: JSON.stringify({ query: payload }), query })
.post(endpoint, { body: JSON.stringify({ query: eachQuery }), query })
.catch((error: any) => {
this.setState({
messages: [
Expand Down Expand Up @@ -897,7 +895,7 @@ export class Main extends React.Component<MainProps, MainState> {
selectedDatasource: [{ label: 'OpenSearch', key: '' }],
isAccelerationFlyoutOpened: false
});
this.fetchDataConnections();
this.fetchFlintDataSources();
};

DataSourceMenu = this.props.dataSourceManagement?.ui?.getDataSourceMenu<
Expand Down Expand Up @@ -1000,6 +998,7 @@ export class Main extends React.Component<MainProps, MainState> {

return (
<>
{console.log(this.props.savedObjects)}
{this.props.dataSourceEnabled && (
<this.DataSourceMenu
setMenuMountPoint={this.props.setActionMenu}
Expand Down
2 changes: 0 additions & 2 deletions server/services/QueryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@ export default class QueryService {
},
};
} catch (err) {
this.logger.info('error describeQueryJobIdInternal');
this.logger.info(err);
this.logger.info(request.query);

console.log(err, request.query);
return {
data: {
ok: false,
Expand Down

0 comments on commit 8de3cce

Please sign in to comment.