himanish-star commented on code in PR #15511:
URL: https://github.com/apache/pinot/pull/15511#discussion_r2036402556


##########
pinot-controller/src/main/resources/app/components/Homepage/Operations/RebalanceServer/RebalanceServerConfigurationOptions/RebalanceServerConfigurationOptionInteger.tsx:
##########
@@ -26,11 +26,14 @@ import {
 type RebalanceServerConfigurationOptionIntegerProps = {
     option: RebalanceServerOption;
     handleConfigChange: (config: { [key: string]: string | number | boolean }) 
=> void;
+    rebalanceConfig: { [optionName: string]: string | boolean | number };
 }
 export const RebalanceServerConfigurationOptionInteger = (
-    { option, handleConfigChange }: 
RebalanceServerConfigurationOptionIntegerProps
+    { option, handleConfigChange, rebalanceConfig }: 
RebalanceServerConfigurationOptionIntegerProps
 ) => {
-    const [value, setValue] = useState<number>(option.defaultValue as number);
+    const [value, setValue] = useState<number>(
+        (Object.keys(rebalanceConfig).includes(option.name) ? 
rebalanceConfig[option.name] : option.defaultValue) as number

Review Comment:
   Create a common util for this!



##########
pinot-controller/src/main/resources/app/components/Homepage/Operations/RebalanceServer/RebalanceServerResponses/RebalanceServerResponseLabelValue.tsx:
##########
@@ -25,7 +25,7 @@ export const RebalanceServerResponseLabelValue = (
     return (
         <Box>
             <Typography color='textSecondary' 
variant='caption'>{label}</Typography>
-            <Typography style={{ fontWeight: 600 }} 
variant='body2'>{value}</Typography>
+            <div><Typography style={{ fontWeight: 600 }} 
variant='body2'>{value.split("\n").join("<br />")}</Typography></div>

Review Comment:
   Remove `div`



-- 
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...@pinot.apache.org

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


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

Reply via email to