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 <dblock@amazon.com>

Signed-off-by: dblock <dblock@amazon.com>

* Add .whitesource configuration file (#1)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
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 <sgguruda@amazon.com>

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
(cherry picked from commit 5dde647)

Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>

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

Signed-off-by: Joshua Li <joshuali925@gmail.com>

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

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

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

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

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

Signed-off-by: dblock <dblock@amazon.com>

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

Signed-off-by: Miki <miki@amazon.com>

* 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 <dxho@amazon.com>

* add CI item in infra

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>
(cherry picked from commit 5cecd8d)

Co-authored-by: Derek Ho <dxho@amazon.com>

* baseline repo groups (opensearch-project#52)

Signed-off-by: Derek Ho <dxho@amazon.com>

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

Signed-off-by: Chen Dai <daichen@amazon.com>

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

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

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

* update maintainers and code owners

Signed-off-by: Derek Ho <dxho@amazon.com>

* add ani to codeowners

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>

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

* Add release notes for 2.8

Signed-off-by: Joshua Li <joshuali925@gmail.com>

* Update release notes

Signed-off-by: Joshua Li <joshuali925@gmail.com>

---------

Signed-off-by: Joshua Li <joshuali925@gmail.com>

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

Signed-off-by: Joshua Li <joshuali925@gmail.com>

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

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

* Update CI. (opensearch-project#82)

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

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

Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: opensearch-ci-bot <opensearch-infra@amazon.com>

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

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

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

* Add semver resolution to patch CVE-2022-25883

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

---------

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

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

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

* 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update fail backport (opensearch-project#104)

Signed-off-by: Derek Ho <dxho@amazon.com>

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

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

Signed-off-by: Derek Ho <dxho@amazon.com>

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

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

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

* Add table acceleration flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* comment on hardcoded elements

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* additional comment on hardcoded

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* remove console logs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* review fixes

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* revert version changes, inline type declare

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: opensearch-ci-bot <opensearch-infra@amazon.com>

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

* add materialized view visual builder and query builders

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* organize header and PR comments

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* Define tables (opensearch-project#126)

* added changes for sidebar

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* added side bar with tables indexed

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* added dynamic element for tree view, addressed pr comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

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

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* changed the constants file

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* added changes for search bar removal, pr comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* readded console.log

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* updated test suites, removed search field

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* added changes for Data connection and combo box

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* updated mock for http query

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* updated mock template name in tests

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* addressed pr comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* addressed more comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* added error message for sidebar

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* updated snapshots

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

---------

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

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

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

* update form validaitons

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update snapshots, add skipping validator

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update sqlpage snapshot

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add tests for acceleration create

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update acceleration builder tests

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update PR comments

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* adding fix for windows snapshots

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update snapshot files

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

* successfully getting async post requests

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* get query with hardcoded job id working

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* working spark query after constant time wait

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* added polling with some hardcoded values

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* ability to switch between sources implemented

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* implemented basic spinner

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* small pr asks and cancellation implemented

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* fixing small clear state issues

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* reduce route name redundancy

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* remove multiple query implementation for async

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* needed to modify the endpoint

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* default data source being Opensearch and updated snapshots

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

---------

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* 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 <sumukhhs@amazon.com>

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

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* reverted updates to yarn

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* updated tests, snapshots

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

---------

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

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

* add acc index flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* remove [if not exists] from acc creation

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* merge tableview from main

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* adding acc index flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add hash router

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* hide materialized view index type

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update snapshots

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* loading combo boxes for acc flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* adding acceleration backend integ

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update jest tests for acc flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add redirection support for home page

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* fix primary shards count and replica validation

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* remove the caution callout for acc flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* support acc flyout redirection from data sources

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

* disable most buttons

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* code editor read only

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* disabled accelerate button

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

---------

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

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

* added changes for loading, create button

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* removed comments, updated snapshots

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* addressed pr comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* addressed pr comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* addressed pr comments

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* updated snapshots, constant for skipping index

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

---------

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

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

* load table fields after table is selected

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* simplify the map function

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

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

* adding minor updates to acceleration ui

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* edits to acceleration index flyout

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* adding minor edits to table view

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update snapshots

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* remove console log

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* minor fixes to namings and tableview

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update tableview clear db

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[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 <joshuali925@gmail.com>
Co-authored-by: Rupal Mahajan <maharup@amazon.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
Co-authored-by: Miki <amoo_miki@yahoo.com>
Co-authored-by: Derek Ho <dxho@amazon.com>
Co-authored-by: Chen Dai <daichen@amazon.com>
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Co-authored-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Simeon Widdis <sawiddis@gmail.com>
Co-authored-by: sumukhswamy <sumukhhs@amazon.com>
Co-authored-by: Paul Sebastian <paul_sebastian@live.com>
Co-authored-by: Paul Sebastian <paulstn@amazon.com>
  • Loading branch information
17 people committed 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.