Skip to content

Commit bf9fae1

Browse files
author
Marco
committed
latest
1 parent bdfe59d commit bf9fae1

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

components/webui/client/src/components/SqlEditor/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ const SqlEditor = (props: SqlEditorProps) => {
6969
placeholder: "Enter your SQL query",
7070
scrollBeyondLastLine: false,
7171
wordWrap: "on",
72-
automaticLayout: true,
7372
}}
74-
width="100%"
7573
{...props}/>
7674
);
7775
};

components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@ import useSearchStore from "../../../SearchState/index";
1515
const RunButton = () => {
1616
const queryString = useSearchStore((state) => state.queryString);
1717

18-
const isQueryStringEmpty = queryString === "";
19-
const tooltipTitle = isQueryStringEmpty ? "Enter SQL query to run" : "";
18+
const isQueryStringEmpty = "" === queryString;
19+
const tooltipTitle = isQueryStringEmpty ?
20+
"Enter SQL query to run" :
21+
"";
2022

2123
return (
2224
<Tooltip title={tooltipTitle}>
2325
<Button
26+
color={"green"}
27+
disabled={isQueryStringEmpty}
2428
icon={<CaretRightOutlined/>}
25-
color="green"
26-
variant ="solid"
2729
size={"large"}
28-
disabled={isQueryStringEmpty}
30+
variant={"solid"}
2931
>
3032
Run
3133
</Button>

components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlQueryInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const SqlQueryInput = () => {
1717
}, []);
1818

1919
return (
20-
<div className={styles[`editorWrapper`] || "" }>
20+
<div className={styles["editorWrapper"] || ""}>
2121
<SqlEditor
2222
height={"150px"}
2323
onChange={handleChange}/>

components/webui/client/src/pages/SearchPage/SearchControls/SearchButton/SubmitButton/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
SETTINGS_STORAGE_ENGINE,
1212
} from "../../../../../config";
1313
import {computeTimelineConfig} from "../../../SearchResults/SearchResultsTimeline/utils";
14-
import useSearchStore, {SEARCH_STATE_DEFAULT} from "../../../SearchState/index";
14+
import useSearchStore from "../../../SearchState/index";
1515
import {SEARCH_UI_STATE} from "../../../SearchState/typings";
1616
import {handleQuerySubmit} from "../../search-requests";
1717
import styles from "./index.module.css";
@@ -63,7 +63,7 @@ const SubmitButton = () => {
6363
selectDataset,
6464
updateCachedDataset]);
6565

66-
const isQueryStringEmpty = queryString === SEARCH_STATE_DEFAULT.queryString;
66+
const isQueryStringEmpty = "" === queryString;
6767

6868
// Submit button must be disabled if there are no datasets since clp-s requires dataset option
6969
// for queries.

0 commit comments

Comments
 (0)