Skip to content

Commit

Permalink
Revert commits back to after 2.11 release (#211)
Browse files Browse the repository at this point in the history
* Revert "Fix error handling for user w/o proper permissions (#195) (#197)"

This reverts commit 26ed0dc.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "Increment version to 2.11.1.0 (#186)"

This reverts commit b18f5f4.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "added fix for loading spinner issue for other database (#189) (#192)"

This reverts commit 94805c5.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "UI-bug fixes, added create query for MV (#182) (#188)"

This reverts commit 4187b6d.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "Add backticks and remove ckpt for manual refresh in acceleration flyout (#183) (#185)"

This reverts commit f96c5d9.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "Session update, minor fixes for acceleration flyout (#179) (#181)"

This reverts commit 257fb53.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "UI fixes for loading state, empty tree, added toast for error, fixed no indicies error (#176) (#178)"

This reverts commit 3c47d47.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "Make checkpoint mandatory, add watermark delay, minor UI fixes (#173) (#175)"

This reverts commit 0198fa7.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "design changes for loading, changed the banner, updated tests (#170) (#172)"

This reverts commit 786c7c7.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "Support dark mode and session for sql, minor bug fixes (#165) (#169)"

This reverts commit 0f5673a.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "Added changes for making tree view persistent, made changes for bugs for loading screen (#153) (#167)"

This reverts commit 2269d1d.

Signed-off-by: Eric <menwe@amazon.com>

* Revert "fixed create table async query bug (#158) (#163)"

This reverts commit 1964008.

Signed-off-by: Eric <menwe@amazon.com>

---------

Signed-off-by: Eric <menwe@amazon.com>
  • Loading branch information
mengweieric committed Nov 13, 2023
1 parent 4e26e8d commit 32a7495
Show file tree
Hide file tree
Showing 58 changed files with 4,784 additions and 13,744 deletions.
48 changes: 10 additions & 38 deletions common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,20 @@ export const OPENSEARCH_ACC_DOCUMENTATION_URL =
export const ACC_INDEX_TYPE_DOCUMENTATION_URL =
'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md';

export const TREE_ITEM_SKIPPING_INDEX_DEFAULT_NAME = `skipping_index`;
export const TREE_ITEM_COVERING_INDEX_DEFAULT_NAME = `covering_index`;
export const TREE_ITEM_MATERIALIZED_VIEW_DEFAULT_NAME = `materialized_view`;
export const TREE_ITEM_DATABASE_NAME_DEFAULT_NAME = `database`;
export const TREE_ITEM_TABLE_NAME_DEFAULT_NAME = `table`;
export const TREE_ITEM_LOAD_MATERIALIZED_BADGE_NAME = `Load Materialized View`;
export const TREE_ITEM_BADGE_NAME = `badge`;
export const LOAD_OPENSEARCH_INDICES_QUERY = `SHOW tables LIKE '%';`;
export const SKIPPING_INDEX_QUERY = `CREATE SKIPPING INDEX ON datasource.database.table
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,
checkpoint_location = 's3://test/'
auto_refresh = true
)`;
export const COVERING_INDEX_QUERY = `CREATE INDEX covering_idx ON datasource.database.table
export const COVERING_INDEX_QUERY = `CREATE INDEX covering_idx ON myS3.logs_db.http_logs
(status)
WITH (
auto_refresh = true,
checkpoint_location = 's3://test/'
auto_refresh = true
)`;
export const CREATE_DATABASE_QUERY = `CREATE DATABASE datasource.database`;
export const CREATE_TABLE_QUERY = `CREATE EXTERNAL TABLE datasource.database.table (
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 @@ -44,17 +36,6 @@ OPTIONS (
compression 'gzip'
);`;

export const CREATE_MATERIALIZED_VIEW = `CREATE MATERIALIZED VIEW datasource.database.materialized_view
AS SELECT
count(field)
FROM datasource.database.table
GROUP BY TUMBLE (timestamp, '2 hours')
WITH (
auto_refresh = true,
watermark_delay = '2 minutes',
checkpoint_location = 's3://test/'
)`;

export const ACCELERATION_INDEX_TYPES = [
{ label: 'Skipping Index', value: 'skipping' },
{ label: 'Covering Index', value: 'covering' },
Expand Down Expand Up @@ -85,7 +66,7 @@ export const SKIPPING_INDEX_ACCELERATION_METHODS = [

export const ACCELERATION_ADD_FIELDS_TEXT = '(add fields here)';
export const ACCELERATION_INDEX_NAME_REGEX = /^[a-z][a-z_]*$/;
export const ACCELERATION_S3_URL_REGEX = /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+/;
export const ACCELERATION_S3_URL_REGEX = /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+\/.*/;
export const ACCELERATION_DEFUALT_SKIPPING_INDEX_NAME = 'skipping';

export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices have a naming format of pattern: \`prefix_<index name>_suffix\`. They share a common prefix structure, which is \`flint_<data source name>_<database name>_<table name>_\`. Additionally, they may have a suffix that varies based on the index type.
Expand All @@ -102,13 +83,4 @@ export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices
- All user given index names must be in lowercase letters. Index name cannot begin with underscores. Spaces, commas, and characters -, :, ", *, +, /, \, |, ?, #, >, or < are not allowed.
`;

export const OPENSEARCH_SQL_INIT_QUERY = `SHOW tables LIKE '%';`;
export const TIMESTAMP_DATATYPE = 'timestamp';
export const FETCH_OPENSEARCH_INDICES_PATH = '/api/sql_console/sqlquery';
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';
export const SIDEBAR_POLL_INTERVAL_MS = 5000;
37 changes: 0 additions & 37 deletions common/toast/index.tsx

This file was deleted.

30 changes: 1 addition & 29 deletions common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ export interface RefreshIntervalType {
refreshInterval: string;
}

export interface watermarkDelayType {
delayWindow: number;
delayInterval: string;
}

export type AccelerationIndexType = 'skipping' | 'covering' | 'materialized';

export interface GroupByTumbleType {
Expand All @@ -62,7 +57,6 @@ export interface FormErrorsType {
replicaShardsError: string[];
refreshIntervalError: string[];
checkpointLocationError: string[];
watermarkDelayError: string[];
}

export type AccelerationRefreshType = 'auto' | 'interval' | 'manual';
Expand All @@ -81,30 +75,8 @@ export interface CreateAccelerationForm {
replicaShardsCount: number;
refreshType: AccelerationRefreshType;
checkpointLocation: string | undefined;
watermarkDelay: watermarkDelayType;
refreshIntervalOptions: RefreshIntervalType;
formErrors: FormErrorsType;
}

export type AsyncQueryLoadingStatus = 'SUCCESS' | 'FAILED' | 'RUNNING' | 'SCHEDULED' | 'CANCELLED';
export type TreeItemType =
| 'covering_index'
| 'skipping_index'
| 'table'
| 'database'
| 'materialized_view'
| 'Load Materialized View'
| 'badge';

export interface TreeItem {
name: string;
type: TreeItemType;
isExpanded: boolean;
values?: TreeItem[];
isLoading?: boolean;
}

export interface DatasourceTreeLoading {
flag: boolean;
status: string;
}
export type AsyncQueryLoadingStatus = 'SUCCESS' | 'FAILED' | 'RUNNING' | 'SCHEDULED' | 'CANCELED';
68 changes: 0 additions & 68 deletions common/utils/async_query_helpers.ts

This file was deleted.

10 changes: 4 additions & 6 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"id": "queryWorkbenchDashboards",
"version": "2.11.1.0",
"opensearchDashboardsVersion": "2.11.1",
"version": "2.11.0.0",
"opensearchDashboardsVersion": "2.11.0",
"server": true,
"ui": true,
"requiredPlugins": [
"navigation"
],
"requiredPlugins": ["navigation"],
"optionalPlugins": []
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch-query-workbench",
"version": "2.11.1.0",
"version": "2.11.0.0",
"description": "Query Workbench",
"main": "index.js",
"license": "Apache-2.0",
Expand Down Expand Up @@ -47,4 +47,4 @@
"semver": "^7.5.2",
"@cypress/request": "^3.0.0"
}
}
}
19 changes: 19 additions & 0 deletions public/ace-themes/sql_console.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import * as ace from 'brace';

ace.define('ace/theme/sql_console', ['require', 'exports', 'module', 'ace/lib/dom'], function (
acequire,
exports,
module
) {
exports.isDark = false;
exports.cssClass = 'ace-sql-console';
exports.cssText = require('../index.scss');

const dom = acequire('../lib/dom');
dom.importCssString(exports.cssText, exports.cssClass);
});
Loading

0 comments on commit 32a7495

Please sign in to comment.