Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fill hyphen strings to workbench table cells that have null and missing values #944

Merged
merged 4 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"jest-raw-loader": "^1.0.1",
"lint-staged": "^10.2.0",
"mutationobserver-shim": "^0.3.3",
"ts-jest": "^25.4.0",
"ts-jest": "^26.1.0",
"ts-node": "^8.9.1",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0",
Expand Down
379 changes: 379 additions & 0 deletions workbench/public/components/Main/__snapshots__/main.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,385 @@ exports[`<Main /> spec click run button, and response is ok 1`] = `
</div>
`;

exports[`<Main /> spec click run button, response fills null and missing values 1`] = `
<div>
<div>
<div
class="sql-console-query-container"
>
<div
class="query-language-switch"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem"
>
<h1
class="euiTitle euiTitle--large"
>
Query Workbench
</h1>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<fieldset
class="euiButtonGroup__fieldset"
>
<legend
class="euiScreenReaderOnly"
>
query-language-swtich
</legend>
<div
class="euiButtonGroup euiButtonGroup--m query-language-switch"
>
<div
class="euiToggle euiToggle--checked euiButtonToggle__wrapper euiButtonGroup__toggle"
>
<input
aria-label="SQL"
checked=""
class="euiToggle__input euiButtonToggle__input"
title="SQL"
type="radio"
value=""
/>
<button
class="euiButton euiButton--text euiButtonToggle euiButtonGroup__button euiButtonGroup__button--selected euiButton--fill"
id="SQL"
tabindex="-1"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
SQL
</span>
</span>
</button>
</div>
<div
class="euiToggle euiButtonToggle__wrapper euiButtonGroup__toggle"
>
<input
aria-label="PPL"
class="euiToggle__input euiButtonToggle__input"
title="PPL"
type="radio"
value=""
/>
<button
class="euiButton euiButton--text euiButtonToggle euiButtonGroup__button"
id="PPL"
tabindex="-1"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
PPL
</span>
</span>
</button>
</div>
</div>
</fieldset>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<a
class="euiButton euiButton--primary"
href="https://opendistro.github.io/for-elasticsearch-docs/docs/sql/"
rel="noopener noreferrer"
target="_blank"
>
<span
class="euiButtonContent euiButtonContent--iconRight euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
SQL documentation
</span>
</span>
</a>
</div>
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
/>
<div>
<div
class="euiPanel euiPanel--paddingLarge sql-console-query-editor container-panel"
>
<div
class="euiText euiText--medium sql-query-panel-header"
>
<h3>
Query editor
</h3>
</div>
<div
class="euiSpacer euiSpacer--s"
/>
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
style="width: 100%; height: 7rem;"
>
<div
class="euiCodeEditorKeyboardHint"
data-test-subj="codeEditorHint"
id="some_html_id"
role="button"
tabindex="0"
>
<p
class="euiText"
>
Press Enter to start editing.
</p>
<p
class="euiText"
>
When you're done, press Escape to stop editing.
</p>
</div>
<div
class=" ace_editor ace-sql-console"
id="some_html_id"
style="width: 100%; height: 7rem; font-size: 14px;"
>
<textarea
aria-label="Code Editor"
autocapitalize="off"
autocorrect="off"
class="ace_text-input"
spellcheck="false"
style="opacity: 0;"
tabindex="-1"
wrap="off"
/>
<div
aria-hidden="true"
class="ace_gutter"
>
<div
class="ace_layer ace_gutter-layer ace_folding-enabled"
/>
<div
class="ace_gutter-active-line"
/>
</div>
<div
class="ace_scroller"
>
<div
class="ace_content"
>
<div
class="ace_layer ace_print-margin-layer"
>
<div
class="ace_print-margin"
style="left: 4px; visibility: hidden;"
/>
</div>
<div
class="ace_layer ace_marker-layer"
/>
<div
class="ace_layer ace_text-layer"
style="padding: 0px 4px;"
/>
<div
class="ace_layer ace_marker-layer"
/>
<div
class="ace_layer ace_cursor-layer ace_hidden-cursors"
>
<div
class="ace_cursor"
/>
</div>
</div>
</div>
<div
class="ace_scrollbar ace_scrollbar-v"
style="display: none; width: 20px;"
>
<div
class="ace_scrollbar-inner"
style="width: 20px;"
/>
</div>
<div
class="ace_scrollbar ace_scrollbar-h"
style="display: none; height: 20px;"
>
<div
class="ace_scrollbar-inner"
style="height: 20px;"
/>
</div>
<div
style="height: auto; width: auto; top: 0px; left: 0px; visibility: hidden; position: absolute; white-space: pre; overflow: hidden;"
>
<div
style="height: auto; width: auto; top: 0px; left: 0px; visibility: hidden; position: absolute; white-space: pre; overflow: visible;"
/>
<div
style="height: auto; width: auto; top: 0px; left: 0px; visibility: hidden; position: absolute; white-space: pre; overflow: visible;"
>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
</div>
</div>
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
/>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--directionRow euiFlexGroup--responsive action-container"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--primary sql-editor-button euiButton--fill"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
Run
</span>
</span>
</button>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--primary sql-editor-button"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
Clear
</span>
</span>
</button>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--primary sql-editor-button"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
Explain
</span>
</span>
</button>
</div>
</div>
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
/>
<div
class="sql-console-query-result"
>
<div
class="euiPanel query-result-container"
>
<div
style="padding: 20px 20px 0px 20px;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem"
>
<div
class="euiText euiText--medium query-result-panel-header"
>
<h3>
Results
</h3>
</div>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
/>
</div>
</div>
<div
class="euiSpacer euiSpacer--xxl"
/>
<div
class="euiSpacer euiSpacer--xl"
/>
<div
class="euiText euiText--medium"
style="color: rgb(63, 63, 63);"
>
<div
class="euiTextAlign euiTextAlign--center"
>
<h4>
No result
</h4>
</div>
<div
class="euiTextAlign euiTextAlign--center"
>
<p>
Enter a query in the query editor above to see results.
</p>
</div>
</div>
<div
class="euiSpacer euiSpacer--xxl"
/>
<div
class="euiSpacer euiSpacer--xl"
/>
</div>
</div>
</div>
</div>
</div>
`;

exports[`<Main /> spec click translation button, and response is ok 1`] = `
<div
aria-hidden="true"
Expand Down
Loading