Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert commits back to after 2.11 release #211

Merged
merged 12 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Support dark mode and session for sql, minor bug fixes (#165) (
…#169)"

This reverts commit 0f5673a.

Signed-off-by: Eric <[email protected]>
mengweieric committed Nov 8, 2023
commit 7da6abab41d33a067aacf3ecfb3678df29b33251
10 changes: 4 additions & 6 deletions common/constants/index.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ 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 TREE_ITEM_BADGE_NAME =`badge`
export const LOAD_OPENSEARCH_INDICES_QUERY = `SHOW tables LIKE '%';`;
export const SKIPPING_INDEX_QUERY = `CREATE SKIPPING INDEX ON myS3.logs_db.http_logs
(status VALUE_SET)
@@ -89,8 +89,6 @@ 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 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 SIDEBAR_POLL_INTERVAL_MS = 5000;

export const FETCH_OPENSEARCH_INDICES_PATH = '/api/sql_console/sqlquery'
62 changes: 0 additions & 62 deletions common/utils/async_query_helpers.ts

This file was deleted.

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);
});
63 changes: 35 additions & 28 deletions public/components/Main/__snapshots__/main.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -296,15 +296,15 @@ exports[`<Main /> spec click clear button 1`] = `
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -323,9 +323,9 @@ exports[`<Main /> spec click clear button 1`] = `
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -523,6 +523,7 @@ exports[`<Main /> spec click clear button 1`] = `
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
@@ -849,15 +850,15 @@ exports[`<Main /> spec click run button, and response causes an error 1`] = `
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -876,9 +877,9 @@ exports[`<Main /> spec click run button, and response causes an error 1`] = `
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -1076,6 +1077,7 @@ exports[`<Main /> spec click run button, and response causes an error 1`] = `
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
@@ -1402,15 +1404,15 @@ exports[`<Main /> spec click run button, and response is not ok 1`] = `
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -1429,9 +1431,9 @@ exports[`<Main /> spec click run button, and response is not ok 1`] = `
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -1629,6 +1631,7 @@ exports[`<Main /> spec click run button, and response is not ok 1`] = `
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
@@ -2043,15 +2046,15 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -2070,9 +2073,9 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -2270,6 +2273,7 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
@@ -2680,15 +2684,15 @@ exports[`<Main /> spec click run button, response fills null and missing values
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -2707,9 +2711,9 @@ exports[`<Main /> spec click run button, response fills null and missing values
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -2907,6 +2911,7 @@ exports[`<Main /> spec click run button, response fills null and missing values
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
@@ -3236,15 +3241,15 @@ exports[`<Main /> spec click translation button, and response is ok 1`] = `
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -3263,9 +3268,9 @@ exports[`<Main /> spec click translation button, and response is ok 1`] = `
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -3463,6 +3468,7 @@ exports[`<Main /> spec click translation button, and response is ok 1`] = `
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
@@ -3811,15 +3817,15 @@ exports[`<Main /> spec renders the component 1`] = `
/>
<div>
<div
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel coreSystemRootDomElement"
class="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow sql-console-query-editor container-panel"
>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 10rem;"
style="width: 100%; height: 7rem;"
>
<button
class="euiCodeEditorKeyboardHint"
@@ -3838,9 +3844,9 @@ exports[`<Main /> spec renders the component 1`] = `
</p>
</button>
<div
class=" ace_editor ace-tm"
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 10rem; font-size: 14px;"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
@@ -4038,6 +4044,7 @@ exports[`<Main /> spec renders the component 1`] = `
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
Loading