You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2024/12/25 04:28:39 UTC
(pinot) branch master updated: add icons and shortcuts for query submit and format (#14697)
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new e98389d8ee add icons and shortcuts for query submit and format (#14697)
e98389d8ee is described below
commit e98389d8eeca7d928adfc51b43c814af3f68a207
Author: Johan Adami <47...@users.noreply.github.com>
AuthorDate: Tue Dec 24 23:28:34 2024 -0500
add icons and shortcuts for query submit and format (#14697)
---
pinot-controller/src/main/resources/app/pages/Query.tsx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pinot-controller/src/main/resources/app/pages/Query.tsx b/pinot-controller/src/main/resources/app/pages/Query.tsx
index cbb788bc8e..364765c50c 100644
--- a/pinot-controller/src/main/resources/app/pages/Query.tsx
+++ b/pinot-controller/src/main/resources/app/pages/Query.tsx
@@ -233,6 +233,10 @@ const QueryPage = () => {
if (modifiedEnabled && event.keyCode == 191) {
handleComment(editor);
}
+ // Map (Cmd/Ctrl) + \ KeyPress to toggle formatting the query
+ if (modifiedEnabled && event.keyCode == 220) {
+ handleFormatSQL(editor.getValue());
+ }
}
const handleComment = (cm: NativeCodeMirror.Editor) => {
@@ -539,6 +543,7 @@ const QueryPage = () => {
variant="contained"
color="primary"
onClick={() => handleFormatSQL(inputQuery)}
+ endIcon={<span style={{fontSize: '0.8em', lineHeight: 1}}>{navigator.platform.includes('Mac') ? '⌘\\' : 'Ctrl+\\'}</span>}
>
Format SQL
</Button>
@@ -549,6 +554,7 @@ const QueryPage = () => {
variant="contained"
color="primary"
onClick={() => handleRunNow()}
+ endIcon={<span style={{fontSize: '0.8em', lineHeight: 1}}>{navigator.platform.includes('Mac') ? '⌘↵' : 'Ctrl+↵'}</span>}
>
Run Query
</Button>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org