Skip to content

Commit

Permalink
Revert "UI fixes for loading state, empty tree, added toast for error…
Browse files Browse the repository at this point in the history
…, fixed no indicies error (opensearch-project#176) (opensearch-project#178)"

This reverts commit 3c47d47.

Signed-off-by: Eric <menwe@amazon.com>
  • Loading branch information
mengweieric committed Nov 8, 2023
1 parent 2b7fba3 commit 6d5e044
Show file tree
Hide file tree
Showing 18 changed files with 5,040 additions and 9,700 deletions.
3 changes: 0 additions & 3 deletions common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,3 @@ export const POLL_INTERVAL_MS = 2000;
export const ASYNC_QUERY_ENDPOINT = '/api/spark_sql_console';
export const ASYNC_QUERY_JOB_ENDPOINT = ASYNC_QUERY_ENDPOINT + '/job/';
export const ASYNC_QUERY_SESSION_ID = 'async-query-session-id';

export const SAMPLE_PPL_QUERY = 'source = <datasource>.<database>.<table> | head 10';
export const SAMPLE_SQL_QUERY = 'select * from <datasource>.<database>.<table> limit 10';
37 changes: 0 additions & 37 deletions common/toast/index.tsx

This file was deleted.

5 changes: 2 additions & 3 deletions common/utils/async_query_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ export const pollQueryStatus = (id: string, http: CoreStart['http'], callback) =
callback({ status: status });
setTimeout(() => pollQueryStatus(id, http, callback), POLL_INTERVAL_MS);
} else if (status === 'failed') {
const results = res.data.resp;
callback({ status: 'FAILED', error: results.error });
callback({ status: 'FAILED', results: [] });
} else if (status === 'success') {
const results = _.get(res.data.resp, 'datarows');
callback({ status: 'SUCCESS', results: results });
}
})
.catch((err) => {
console.error(err);
callback({ status: 'FAILED', error: 'Failed to fetch data' });
callback([]);
});
};
Loading

0 comments on commit 6d5e044

Please sign in to comment.