diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.module.css b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.module.css
index e52046a5b7..55180053c5 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.module.css
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.module.css
@@ -1,3 +1,14 @@
.sqlInterfaceButton {
- width: 190px;
+ width: 100%;
+ margin-bottom: 0px;
+}
+
+.sqlInterfaceButton :global(.ant-tabs-nav) {
+ margin-bottom: 8px;
+}
+
+.tabLabel {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
}
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.tsx b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.tsx
index f5d6070c56..e2ba72b46e 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.tsx
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlInterfaceSelector/index.tsx
@@ -1,14 +1,7 @@
import {useCallback} from "react";
-import {
- AppstoreOutlined,
- EditOutlined,
-} from "@ant-design/icons";
-import {
- ConfigProvider,
- Segmented,
- theme,
-} from "antd";
+import {AppstoreOutlined, EditOutlined} from "@ant-design/icons";
+import {Tabs} from "antd";
import useSearchStore from "../../../SearchState";
import usePrestoSearchState from "../../../SearchState/Presto";
@@ -25,7 +18,6 @@ import styles from "./index.module.css";
* @return
*/
const SqlInterfaceSelector = () => {
- const {token} = theme.useToken();
const sqlInterface = usePrestoSearchState((state) => state.sqlInterface);
const searchUiState = useSearchStore((state) => state.searchUiState);
const disabled = searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING ||
@@ -48,36 +40,33 @@ const SqlInterfaceSelector = () => {
return (
-
handleChange(value as PRESTO_SQL_INTERFACE)}
+ size="small"
+ items={[
+ {
+ key: PRESTO_SQL_INTERFACE.GUIDED,
+ label: (
+
+
+ Guided
+
+ ),
+ disabled,
},
- }}
- >
- ,
- },
- {
- label: "Manual",
- value: PRESTO_SQL_INTERFACE.FREEFORM,
- icon: ,
- },
- ]}
- onChange={(value) => {
- handleChange(value);
- }}/>
-
+ {
+ key: PRESTO_SQL_INTERFACE.FREEFORM,
+ label: (
+
+
+ Manual
+
+ ),
+ disabled,
+ },
+ ]}
+ />
);
};
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.module.css b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.module.css
index b527209aa1..d34054406e 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.module.css
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.module.css
@@ -1,3 +1,5 @@
.cancelButton {
- width: 100%;
+ min-width: 36px;
+ padding-inline: 8px;
+ height: 100%;
}
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.tsx b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.tsx
index 7d1dfdfdc0..d7d406cba9 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.tsx
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/CancelButton/index.tsx
@@ -47,12 +47,11 @@ const CancelButton = () => {
color={"red"}
htmlType={"button"}
icon={
}
+ aria-label={"Cancel query"}
size={"middle"}
variant={"solid"}
onClick={handleClick}
- >
- Cancel
-
+ />
);
};
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/FreeformRunButton.tsx b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/FreeformRunButton.tsx
index 8b47d7fd9c..9768c5f2f8 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/FreeformRunButton.tsx
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/FreeformRunButton.tsx
@@ -36,14 +36,13 @@ const FreeformRunButton = () => {
className={styles["runButton"] || ""}
color={"green"}
icon={
}
+ aria-label={"Run query"}
size={"middle"}
variant={"solid"}
disabled={isQueryStringEmpty ||
searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING}
onClick={handleClick}
- >
- Run
-
+ />
);
};
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/GuidedRunButton.tsx b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/GuidedRunButton.tsx
index 69ae79d6a7..8dc4ba34f6 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/GuidedRunButton.tsx
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/GuidedRunButton.tsx
@@ -91,6 +91,7 @@ const GuidedRunButton = () => {
color={"green"}
htmlType={"submit"}
icon={
}
+ aria-label={"Run query"}
size={"middle"}
variant={"solid"}
disabled={!isQueryReady ||
@@ -100,9 +101,7 @@ const GuidedRunButton = () => {
throw err;
});
}}
- >
- Run
-
+ />
);
};
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/index.module.css b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/index.module.css
index 84b9ad35f8..e4dbe7d973 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/index.module.css
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/RunButton/index.module.css
@@ -1,3 +1,5 @@
.runButton {
- width: 100%;
+ min-width: 36px;
+ padding-inline: 8px;
+ height: 100%;
}
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/index.module.css b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/index.module.css
index f7ce0b59e3..c09dcbdde0 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/index.module.css
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlSearchButton/index.module.css
@@ -1,3 +1,7 @@
.runButtonContainer {
- width: 100px;
+ width: auto;
+ min-width: 0;
+ display: flex;
+ justify-content: flex-end;
+ height: 100%;
}
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/index.module.css b/components/webui/client/src/pages/SearchPage/SearchControls/index.module.css
index 02a8e65689..762532390e 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/index.module.css
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/index.module.css
@@ -13,15 +13,26 @@
margin-left: 2px;
}
-.runRow {
+.buttons {
+ display: flex;
+ flex-direction: row;
+ gap: 5px;
+}
+
+.inputsAndRunRow {
display: flex;
- align-items: flex-start;
- justify-content: space-between;
+ align-items: stretch;
gap: 10px;
}
-.buttons {
+.inputGrow {
+ flex: 1;
+ min-width: 0;
+}
+
+.runColumn {
display: flex;
- flex-direction: row;
- gap: 5px;
+ align-items: stretch;
+ justify-content: flex-end;
+ align-self: stretch;
}
diff --git a/components/webui/client/src/pages/SearchPage/SearchControls/index.tsx b/components/webui/client/src/pages/SearchPage/SearchControls/index.tsx
index fc8e2e5f21..da3773a5f7 100644
--- a/components/webui/client/src/pages/SearchPage/SearchControls/index.tsx
+++ b/components/webui/client/src/pages/SearchPage/SearchControls/index.tsx
@@ -6,6 +6,7 @@ import {PRESTO_SQL_INTERFACE} from "../SearchState/Presto/typings";
import NativeControls from "./Native/NativeControls";
import FreeformControls from "./Presto/Freeform/FreeformControls";
import GuidedControls from "./Presto/Guided/GuidedControls";
+import SqlInterfaceSelector from "./Presto/SqlInterfaceSelector";
/**
@@ -26,18 +27,18 @@ const SearchControls = () => {
const sqlInterface = usePrestoSearchState((state) => state.sqlInterface);
const isPrestoGuided = sqlInterface === PRESTO_SQL_INTERFACE.GUIDED;
- let controls;
if (SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO) {
- controls =
;
- } else if (isPrestoGuided) {
- controls =
;
- } else {
- controls =
;
+ return (
+
+ );
}
return (
);
};