jayeshchoudhary commented on code in PR #15623: URL: https://github.com/apache/pinot/pull/15623#discussion_r2059794610
########## pinot-controller/src/main/resources/app/pages/TenantDetails.tsx: ########## @@ -743,6 +772,111 @@ const TenantPageDetails = ({ match }: RouteComponentProps<Props>) => { tableName={tableName} /> )} + {/* Consuming Segments Info Dialog */} + {showConsumingSegmentsModal && ( + <CustomDialog + open={showConsumingSegmentsModal} + handleClose={() => setShowConsumingSegmentsModal(false)} + title="Consuming Segments Info" + size="lg" + showOkBtn={false} + btnCancelText="Close" + disableBackdropClick + > + {loadingConsumingSegments ? ( + <Typography>Loading consuming segments info...</Typography> + ) : consumingSegmentsInfo ? ( + <Box style={{ maxHeight: '70vh', overflowY: 'auto' }}> + <Typography><strong>Servers Failing To Respond:</strong> {consumingSegmentsInfo.serversFailingToRespond || 'N/A'}</Typography> + <Typography><strong>Servers Unparsable Respond:</strong> {consumingSegmentsInfo.serversUnparsableRespond || 'N/A'}</Typography> + <Box mt={2}> + {(() => { + const columns = [ + 'Segment Name', + 'Server Details', + 'Max Partition Offset Lag', + 'Max Partition Availability Lag (ms)', + ]; + const records = []; Review Comment: good suggestion by chatgpt https://chatgpt.com/share/680b40aa-dd94-8011-9734-48ef3c0a9bb7 - Improve safety with optional chaining - avoid nested if, else and ternary operators - Extract logic into separate functions and components -- 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