Skip to content

Commit

Permalink
2x main merge (#1)
Browse files Browse the repository at this point in the history
* Updated MAINTAINERS.md to match recommended opensearch-project format. (opensearch-project#18)

Signed-off-by: dblock <[email protected]>

Signed-off-by: dblock <[email protected]>

* Add .whitesource configuration file (#1)

Co-authored-by: mend-for-github.aaakk.us.kg[bot] <50673670+mend-for-github.aaakk.us.kg[bot]@users.noreply.github.com>

* Bump json5 from 2.2.1 to 2.2.3 (opensearch-project#20)

Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* adding release notes (opensearch-project#28) (opensearch-project#30)

Signed-off-by: Shenoy Pratik <[email protected]>

Signed-off-by: Shenoy Pratik <[email protected]>
(cherry picked from commit 5dde647)

Co-authored-by: Shenoy Pratik <[email protected]>

* Rename plugin_helpers to plugin-helpers (opensearch-project#31)

Signed-off-by: Joshua Li <[email protected]>

* Add resolution for ansi-regex (opensearch-project#38)

Signed-off-by: Rupal Mahajan <[email protected]>

* Upgrade hapi-latest to fix CVE-2023-25166 (opensearch-project#39)

Signed-off-by: Rupal Mahajan <[email protected]>

* Created untriaged issue workflow. (opensearch-project#42)

Signed-off-by: dblock <[email protected]>

* Fix Node.js and Yarn installation in CI (opensearch-project#44)

Signed-off-by: Miki <[email protected]>

* add release notes for 2.6 query workbench (opensearch-project#48) (opensearch-project#50)

* add release notes for 2.6 query workbench

Signed-off-by: Derek Ho <[email protected]>

* add CI item in infra

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
(cherry picked from commit 5cecd8d)

Co-authored-by: Derek Ho <[email protected]>

* baseline repo groups (opensearch-project#52)

Signed-off-by: Derek Ho <[email protected]>

* Add 2.7 release note (opensearch-project#57)

Signed-off-by: Chen Dai <[email protected]>

* Add fix for CVE-2023-2251 (opensearch-project#60)

Signed-off-by: Rupal Mahajan <[email protected]>

* update maintainers and code owners (opensearch-project#64)

* update maintainers and code owners

Signed-off-by: Derek Ho <[email protected]>

* add ani to codeowners

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>

* Add release notes for 2.8 (opensearch-project#75)

* Add release notes for 2.8

Signed-off-by: Joshua Li <[email protected]>

* Update release notes

Signed-off-by: Joshua Li <[email protected]>

---------

Signed-off-by: Joshua Li <[email protected]>

* Use valid json for mock data in unit tests (opensearch-project#76)

Signed-off-by: Joshua Li <[email protected]>

* Update default query. (opensearch-project#81)

Signed-off-by: Yury-Fridlyand <[email protected]>

* Update CI. (opensearch-project#82)

Signed-off-by: Yury-Fridlyand <[email protected]>

* Increment version to 3.0.0.0 (opensearch-project#66)

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>

* Upgrade tough-cookie and semver (opensearch-project#90)

* Upgrade tough-cookie to fix CVE-2023-26136

Signed-off-by: Rupal Mahajan <[email protected]>

* Add semver resolution to patch CVE-2022-25883

Signed-off-by: Rupal Mahajan <[email protected]>

---------

Signed-off-by: Rupal Mahajan <[email protected]>

* Add release notes for 2.9.0 (opensearch-project#93)

Signed-off-by: Rupal Mahajan <[email protected]>

* Bump word-wrap from 1.2.3 to 1.2.4 (opensearch-project#99)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update fail backport (opensearch-project#104)

Signed-off-by: Derek Ho <[email protected]>

* Update backport CI, add PR merged condition (opensearch-project#111)

Signed-off-by: Shenoy Pratik <[email protected]>

* Update searchbar snapshots according to upstream changes (opensearch-project#115)

Signed-off-by: Derek Ho <[email protected]>

* add release notes for 2.10.0 (opensearch-project#117)

Signed-off-by: Shenoy Pratik <[email protected]>

* Upgrade cypress/request (opensearch-project#120)

Signed-off-by: Simeon Widdis <[email protected]>

* Add table acceleration flyout (opensearch-project#128)

* Add table acceleration flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* comment on hardcoded elements

Signed-off-by: Shenoy Pratik <[email protected]>

* additional comment on hardcoded

Signed-off-by: Shenoy Pratik <[email protected]>

* remove console logs

Signed-off-by: Shenoy Pratik <[email protected]>

* review fixes

Signed-off-by: Shenoy Pratik <[email protected]>

* revert version changes, inline type declare

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>

* Increment version to 3.0.0.0 (opensearch-project#121)

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>

* Add materialized view visual builder and query builders (opensearch-project#129)

* add materialized view visual builder and query builders

Signed-off-by: Shenoy Pratik <[email protected]>

* organize header and PR comments

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>

* Define tables (opensearch-project#126)

* added changes for sidebar

Signed-off-by: sumukhswamy <[email protected]>

* added side bar with tables indexed

Signed-off-by: sumukhswamy <[email protected]>

* added dynamic element for tree view, addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* made a few design and panel changes, addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* changed the constants file

Signed-off-by: sumukhswamy <[email protected]>

* added changes for search bar removal, pr comments

Signed-off-by: sumukhswamy <[email protected]>

* readded console.log

Signed-off-by: sumukhswamy <[email protected]>

* updated test suites, removed search field

Signed-off-by: sumukhswamy <[email protected]>

* added changes for Data connection and combo box

Signed-off-by: sumukhswamy <[email protected]>

* updated mock for http query

Signed-off-by: sumukhswamy <[email protected]>

* updated mock template name in tests

Signed-off-by: sumukhswamy <[email protected]>

* addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed more comments

Signed-off-by: sumukhswamy <[email protected]>

* added error message for sidebar

Signed-off-by: sumukhswamy <[email protected]>

* updated snapshots

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>

* update packages and tsconfig (opensearch-project#130)

Signed-off-by: Shenoy Pratik <[email protected]>

* Update form validations and tests for acceleration  (opensearch-project#133)

* update form validaitons

Signed-off-by: Shenoy Pratik <[email protected]>

* update snapshots, add skipping validator

Signed-off-by: Shenoy Pratik <[email protected]>

* update sqlpage snapshot

Signed-off-by: Shenoy Pratik <[email protected]>

* add tests for acceleration create

Signed-off-by: Shenoy Pratik <[email protected]>

* update acceleration builder tests

Signed-off-by: Shenoy Pratik <[email protected]>

* update PR comments

Signed-off-by: Shenoy Pratik <[email protected]>

* adding fix for windows snapshots

Signed-off-by: Shenoy Pratik <[email protected]>

* update snapshot files

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>

* implementing async query support with polling (opensearch-project#131)

* successfully getting async post requests

Signed-off-by: Paul Sebastian <[email protected]>

* get query with hardcoded job id working

Signed-off-by: Paul Sebastian <[email protected]>

* working spark query after constant time wait

Signed-off-by: Paul Sebastian <[email protected]>

* added polling with some hardcoded values

Signed-off-by: Paul Sebastian <[email protected]>

* ability to switch between sources implemented

Signed-off-by: Paul Sebastian <[email protected]>

* implemented basic spinner

Signed-off-by: Paul Sebastian <[email protected]>

* small pr asks and cancellation implemented

Signed-off-by: Paul Sebastian <[email protected]>

* fixing small clear state issues

Signed-off-by: Paul Sebastian <[email protected]>

* reduce route name redundancy

Signed-off-by: Paul Sebastian <[email protected]>

* remove multiple query implementation for async

Signed-off-by: Paul Sebastian <[email protected]>

* needed to modify the endpoint

Signed-off-by: Paul Sebastian <[email protected]>

* default data source being Opensearch and updated snapshots

Signed-off-by: Paul Sebastian <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>

* added the skipping index queries, covering index queries,updates the … (opensearch-project#134)

* added the skipping index queries, covering index queries,updates the data picker

Signed-off-by: sumukhswamy <[email protected]>

* added the skipping index queries, covering index queries,updates the data picker

Signed-off-by: sumukhswamy <[email protected]>

* reverted updates to yarn

Signed-off-by: sumukhswamy <[email protected]>

* updated tests, snapshots

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>

* Acceleration related changes and minor fixes (opensearch-project#135)

* add acc index flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* remove [if not exists] from acc creation

Signed-off-by: Shenoy Pratik <[email protected]>

* merge tableview from main

Signed-off-by: Shenoy Pratik <[email protected]>

* adding acc index flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* add hash router

Signed-off-by: Shenoy Pratik <[email protected]>

* hide materialized view index type

Signed-off-by: Shenoy Pratik <[email protected]>

* update snapshots

Signed-off-by: Shenoy Pratik <[email protected]>

* loading combo boxes for acc flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* adding acceleration backend integ

Signed-off-by: Shenoy Pratik <[email protected]>

* update jest tests for acc flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* add redirection support for home page

Signed-off-by: Shenoy Pratik <[email protected]>

* fix primary shards count and replica validation

Signed-off-by: Shenoy Pratik <[email protected]>

* remove the caution callout for acc flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* support acc flyout redirection from data sources

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>

* disable buttons while running async query (opensearch-project#136)

* disable most buttons

Signed-off-by: Paul Sebastian <[email protected]>

* code editor read only

Signed-off-by: Paul Sebastian <[email protected]>

* disabled accelerate button

Signed-off-by: Paul Sebastian <[email protected]>

---------

Signed-off-by: Paul Sebastian <[email protected]>

* Design changes for the sidebar and update to create button (opensearch-project#138)

* added changes for loading, create button

Signed-off-by: sumukhswamy <[email protected]>

* removed comments, updated snapshots

Signed-off-by: sumukhswamy <[email protected]>

* addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* updated snapshots, constant for skipping index

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>

* Load table fields for acceleration index flyout (opensearch-project#137)

* load table fields after table is selected

Signed-off-by: Shenoy Pratik <[email protected]>

* simplify the map function

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>

* Adding minor updates and bug fixes (opensearch-project#140)

* adding minor updates to acceleration ui

Signed-off-by: Shenoy Pratik <[email protected]>

* edits to acceleration index flyout

Signed-off-by: Shenoy Pratik <[email protected]>

* adding minor edits to table view

Signed-off-by: Shenoy Pratik <[email protected]>

* update snapshots

Signed-off-by: Shenoy Pratik <[email protected]>

* remove console log

Signed-off-by: Shenoy Pratik <[email protected]>

* minor fixes to namings and tableview

Signed-off-by: Shenoy Pratik <[email protected]>

* update tableview clear db

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Rupal Mahajan <[email protected]>
Signed-off-by: Miki <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: mend-for-github.aaakk.us.kg[bot] <50673670+mend-for-github.aaakk.us.kg[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Li <[email protected]>
Co-authored-by: Rupal Mahajan <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Miki <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: Chen Dai <[email protected]>
Co-authored-by: Yury-Fridlyand <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
Co-authored-by: Simeon Widdis <[email protected]>
Co-authored-by: sumukhswamy <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
  • Loading branch information
17 people authored Oct 5, 2023
1 parent fae31c9 commit ce5412b
Show file tree
Hide file tree
Showing 21 changed files with 293 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
* @opensearch-project/sql
* @pjfitzgibbons @ps48 @kavithacm @derek-ho @joshuali925 @dai-chen @YANG-DB @rupal-bq @mengweieric @vamsi-amazon @swiddis @penghuo @seankao-az @MaxKsyunz @Yury-Fridlyand @anirudha
19 changes: 19 additions & 0 deletions .github/workflows/add-untriaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Apply 'untriaged' label during issue lifecycle

on:
issues:
types: [opened, reopened, transferred]

jobs:
apply-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['untriaged']
})
4 changes: 2 additions & 2 deletions .github/workflows/sql-workbench-test-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ on:
env:
PLUGIN_NAME: dashboards-query-workbench
OPENSEARCH_VERSION: '2.x'
OPENSEARCH_PLUGIN_VERSION: 2.10.0.0
OPENSEARCH_PLUGIN_VERSION: 2.11.0.0

jobs:
tests:
name: Run unit tests
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# Enable longer filenames for windows
Expand Down
39 changes: 29 additions & 10 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,32 @@ This document contains a list of maintainers in this repo. See [opensearch-proje

## Current Maintainers

| Maintainer | GitHub ID | Affiliation |
| --------------------- | --------------------------------------------------- | ----------- |
| Anirudha (Ani) Jadhav | [anirudha](https://github.com/anirudha) | Amazon |
| Peng Huo | [penghuo](https://github.com/penghuo) | Amazon |
| Chen Dai | [dai-chen](https://github.com/dai-chen) | Amazon |
| Chloe Zhang | [chloe-zh](https://github.com/chloe-zh) | Amazon |
| Nick Knize | [nknize](https://github.com/nknize) | Amazon |
| Charlotte Henkle | [CEHENKLE](https://github.com/CEHENKLE) | Amazon |
| Max Ksyunz | [MaxKsyunz](https://github.com/MaxKsyunz) | BitQuill |
| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | BitQuill |
| Maintainer | GitHub ID | Affiliation |
| ----------------- | ------------------------------------------------- | ----------- |
| Eric Wei | [mengweieric](https://github.com/mengweieric) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
| Shenoy Pratik | [ps48](https://github.com/ps48) | Amazon |
| Kavitha Mohan | [kavithacm](https://github.com/kavithacm) | Amazon |
| Rupal Mahajan | [rupal-bq](https://github.com/rupal-bq) | Amazon |
| Derek Ho | [derek-ho](https://github.com/derek-ho) | Amazon |
| Lior Perry | [YANG-DB](https://github.com/YANG-DB) | Amazon |
| Peter Fitzgibbons | [pjfitzgibbons](https://github.com/pjfitzgibbons) | Amazon |
| Simeon Widdis | [swiddis](https://github.com/swiddis) | Amazon |
| Chen Dai | [dai-chen](https://github.com/dai-chen) | Amazon |
| Vamsi Manohar | [vamsi-amazon](https://github.com/vamsi-amazon) | Amazon |
| Peng Huo | [penghuo](https://github.com/penghuo) | Amazon |
| Sean Kao | [seankao-az](https://github.com/seankao-az) | Amazon |
| Max Ksyunz | [MaxKsyunz](https://github.com/MaxKsyunz) | BitQuill |
| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | BitQuill |
| Anirudha Jadhav | [anirudha](https://github.com/anirudha) | Amazon |

## Emeritus Maintainers

| Maintainer | GitHub ID | Affiliation |
| ----------------- | ------------------------------------------------------- | ----------- |
| Charlotte Henkle | [CEHENKLE](https://github.com/CEHENKLE) | Amazon |
| Nick Knize | [nknize](https://github.com/nknize) | Amazon |
| David Cui | [davidcui1225](https://github.com/davidcui1225) | Amazon |
| Eugene Lee | [eugenesk24](https://github.com/eugenesk24) | Amazon |
| Zhongnan Su | [zhongnansu](https://github.com/zhongnansu) | Amazon |
| Chloe Zhang | [chloe-zh](https://github.com/chloe-zh) | Amazon |
16 changes: 9 additions & 7 deletions common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ export const PLUGIN_NAME = 'Query Workbench';
export const OPENSEARCH_ACC_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest';
export const ACC_INDEX_TYPE_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest';

export const SKIPPING_INDEX = `skipping_index`
export const SKIPPING_INDEX = `skipping_index`;
export const ON_LOAD_QUERY = `SHOW tables LIKE '%';`;
export const SKIPPING_INDEX_QUERY = `CREATE SKIPPING INDEX ON myS3.logs_db.http_logs
(status VALUE_SET)
WITH (
auto_refresh = true
)`
export const COVERING_INDEX_QUERY =`CREATE INDEX covering_idx ON myS3.logs_db.http_logs
)`;
export const COVERING_INDEX_QUERY = `CREATE INDEX covering_idx ON myS3.logs_db.http_logs
(status)
WITH (
auto_refresh = true
)`
export const CREATE_DATABASE_QUERY =`CREATE DATABASE myS3.logs_db`
export const CREATE_TABLE_QUERY =`CREATE EXTERNAL TABLE logs (
)`;
export const CREATE_DATABASE_QUERY = `CREATE DATABASE myS3.logs_db`;
export const CREATE_TABLE_QUERY = `CREATE EXTERNAL TABLE myS3.logs_db.logs (
key BIGINT,
status INTEGER,
size FLOAT,
Expand All @@ -32,7 +32,7 @@ USING JSON
OPTIONS (
path 's3://test/path',
compression 'gzip'
);`
);`;

export const ACCELERATION_INDEX_TYPES = [
{ label: 'Skipping Index', value: 'skipping' },
Expand Down Expand Up @@ -80,3 +80,5 @@ export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices
##### Note:
- All user given index names must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, \, |, ?, #, >, or < are not allowed.
`;

export const SIDEBAR_POLL_INTERVAL_MS = 5000;
6 changes: 2 additions & 4 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"opensearchDashboardsVersion": "2.11.0",
"server": true,
"ui": true,
"requiredPlugins": [
"navigation"
],
"requiredPlugins": ["navigation"],
"optionalPlugins": []
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"json-schema": "^0.4.0",
"yaml": "^2.2.2",
"tough-cookie": "^4.1.3",
"semver": "^7.5.2"
"semver": "^7.5.2",
"@cypress/request": "^3.0.0"
}
}
51 changes: 48 additions & 3 deletions public/components/Main/__snapshots__/main.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ exports[`<Main /> spec click clear button 1`] = `
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -752,6 +753,7 @@ exports[`<Main /> spec click run button, and response causes an error 1`] = `
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -1311,6 +1313,7 @@ exports[`<Main /> spec click run button, and response is not ok 1`] = `
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -1870,6 +1873,7 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -1974,7 +1978,15 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
class="euiTreeView__nodeLabel"
>
<div>
2
<span
class="euiToolTipAnchor"
>
<div
class="euiText euiText--medium"
>
2
</div>
</span>
</div>
</span>
Expand Down Expand Up @@ -2015,7 +2027,15 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
class="euiTreeView__nodeLabel"
>
<div>
2
<span
class="euiToolTipAnchor"
>
<div
class="euiText euiText--medium"
>
2
</div>
</span>
</div>
</span>
Expand Down Expand Up @@ -2501,6 +2521,7 @@ exports[`<Main /> spec click run button, response fills null and missing values
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -2605,6 +2626,13 @@ exports[`<Main /> spec click run button, response fills null and missing values
class="euiTreeView__nodeLabel"
>
<div>
<span
class="euiToolTipAnchor"
>
<div
class="euiText euiText--medium"
/>
</span>
</div>
</span>
Expand Down Expand Up @@ -2645,6 +2673,13 @@ exports[`<Main /> spec click run button, response fills null and missing values
class="euiTreeView__nodeLabel"
>
<div>
<span
class="euiToolTipAnchor"
>
<div
class="euiText euiText--medium"
/>
</span>
</div>
</span>
Expand Down Expand Up @@ -3133,6 +3168,7 @@ exports[`<Main /> spec click translation button, and response is ok 1`] = `
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -3683,6 +3719,7 @@ exports[`<Main /> spec renders the component 1`] = `
>
<div
class="euiPageSideBar"
style="max-width: 400px; width: 400px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
Expand Down Expand Up @@ -3778,7 +3815,15 @@ exports[`<Main /> spec renders the component 1`] = `
class="euiTreeView__nodeLabel"
>
<div>
.kibana_1
<span
class="euiToolTipAnchor"
>
<div
class="euiText euiText--medium"
>
.kibana_1
</div>
</span>
</div>
</span>
Expand Down
11 changes: 6 additions & 5 deletions public/components/Main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
EuiPageSideBar,
EuiPanel,
EuiSpacer,
EuiText
EuiText,
} from '@elastic/eui';
import { IHttpResponse } from 'angular';
import _ from 'lodash';
Expand Down Expand Up @@ -790,6 +790,9 @@ export class Main extends React.Component<MainProps, MainState> {
}

handleDataSelect = (selectedItems: []) => {
if (selectedItems[0].label !== 'OpenSearch' && this.state.language === 'SQL') {
this.updateSQLQueries('');
}
this.setState({
selectedDatasource: selectedItems,
});
Expand Down Expand Up @@ -912,13 +915,11 @@ export class Main extends React.Component<MainProps, MainState> {
<EuiPage paddingSize="none">
{this.state.language === 'SQL' && (
<EuiPanel>
<EuiPageSideBar>
<EuiPageSideBar style={{ maxWidth: '400px', width: '400px' }}>
<EuiFlexGroup direction="column">
<EuiFlexItem>
<EuiFlexItem grow={false}>
<CreateButton
updateSQLQueries={this.updateSQLQueries}
/>
<CreateButton updateSQLQueries={this.updateSQLQueries} />
</EuiFlexItem>
<EuiSpacer />
<TableView
Expand Down
15 changes: 7 additions & 8 deletions public/components/PPLPage/PPLPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
* SPDX-License-Identifier: Apache-2.0
*/

import React from 'react';
import {
EuiPanel,
EuiButton,
EuiCodeBlock,
EuiCodeEditor,
EuiFlexGroup,
EuiFlexItem,
EuiText,
EuiCodeEditor,
EuiSpacer,
EuiCodeBlock,
EuiModal,
EuiModalBody,
EuiModalFooter,
EuiModalHeader,
EuiModalHeaderTitle,
EuiOverlayMask,
EuiPanel,
EuiSpacer,
EuiText,
} from '@elastic/eui';
import React from 'react';
import { ResponseDetail, TranslateResult } from '../Main/main';
import _ from 'lodash';

interface PPLPageProps {
onRun: (query: string) => void;
Expand Down Expand Up @@ -107,7 +106,7 @@ export class PPLPage extends React.Component<PPLPageProps, PPLPageState> {
<EuiCodeEditor
theme="sql_console"
width="100%"
height="5rem"
height="7rem"
value={this.props.pplQuery}
onChange={this.props.updatePPLQueries}
showPrintMargin={false}
Expand Down
8 changes: 4 additions & 4 deletions public/components/PPLPage/__snapshots__/PPLPage.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`<PPLPage /> spec renders the component 1`] = `
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 5rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
Expand All @@ -39,7 +39,7 @@ exports[`<PPLPage /> spec renders the component 1`] = `
<div
class=" ace_editor ace-tm"
id="some_html_id"
style="width: 100%; height: 5rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
Expand Down Expand Up @@ -211,7 +211,7 @@ exports[`<PPLPage /> spec tests the action buttons 1`] = `
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 5rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
Expand All @@ -232,7 +232,7 @@ exports[`<PPLPage /> spec tests the action buttons 1`] = `
<div
class=" ace_editor ace-tm"
id="some_html_id"
style="width: 100%; height: 5rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
Expand Down
Loading

0 comments on commit ce5412b

Please sign in to comment.