You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/04/25 16:19:34 UTC

[GitHub] [druid] vogievetsky commented on a change in pull request #11158: Web console: Misc QueryView UX improvements

vogievetsky commented on a change in pull request #11158:
URL: https://github.com/apache/druid/pull/11158#discussion_r619840079



##########
File path: web-console/src/views/query-view/query-extra-info/query-extra-info.tsx
##########
@@ -39,20 +39,29 @@ import './query-extra-info.scss';
 export interface QueryExtraInfoProps {
   queryResult: QueryResult;
   onDownload: (filename: string, format: string) => void;
+  onLoadMore: () => void;
 }
 
 export const QueryExtraInfo = React.memo(function QueryExtraInfo(props: QueryExtraInfoProps) {
-  const { queryResult, onDownload } = props;
+  const { queryResult, onDownload, onLoadMore } = props;
+  const wrapQueryLimit = queryResult.getSqlOuterLimit();
+  const hasMoreResults = queryResult.getNumResults() === wrapQueryLimit;
 
-  function handleQueryInfoClick() {
-    const id = queryResult.queryId || queryResult.sqlQueryId;
-    if (!id) return;
+  function handleQueryInfoClick(e: MouseEvent<HTMLDivElement>) {
+    if (e.altKey) {
+      if (hasMoreResults) {
+        onLoadMore();
+      }

Review comment:
       If you are in the state where the auto limit wrapper is applied (`sqlOuterLimit` set in the context) then alt clicking here will 10x the `sqlOuterLimit` something that now happens when you reach the last loaded page.
   
   So if you are in this state:
   
   ![image](https://user-images.githubusercontent.com/177816/116000965-2bece900-a5a7-11eb-8214-543c76d9c491.png)
   
   And you Alt+click the query reruns and you get:
   
   ![image](https://user-images.githubusercontent.com/177816/116000985-3d35f580-a5a7-11eb-9d1e-34c0d8467057.png)
   
   Alt+click again and:
   
   ![image](https://user-images.githubusercontent.com/177816/116000995-4921b780-a5a7-11eb-909a-de3f81577428.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org