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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]