vogievetsky commented on code in PR #16749:
URL: https://github.com/apache/druid/pull/16749#discussion_r1681404339


##########
web-console/src/views/workbench-view/run-panel/run-panel.tsx:
##########
@@ -485,7 +511,10 @@ export const RunPanel = React.memo(function 
RunPanel(props: RunPanelProps) {
             }
           >
             <Button
-              text={`Engine: ${queryEngine || `auto (${effectiveEngine})`}`}
+              text={`Engine: ${
+                (enginesLabelFn ? enginesLabelFn(queryEngine).text : 
queryEngine) ||
+                `auto (${enginesLabelFn ? enginesLabelFn(effectiveEngine) : 
effectiveEngine})`

Review Comment:
   I think a better structure would be instead of letting `enginesLabelFn` 
possibly be undefined throughout the whole component and having to check every 
time you use it to do `const enginesLabelFn = props.enginesLabelFn || 
DEFAULT_ENGINES_LABEL_FN;` at the top of the component and then implement 
everything with `enginesLabelFn` always being called.
   
   Ditto for `maxTaskLabelFn`



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org

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


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

Reply via email to