This is an automated email from the ASF dual-hosted git repository. rongr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push: new 2eacd30295 [UI] use indexes API instead of fetching all segment metadata (#11793) 2eacd30295 is described below commit 2eacd30295011e9a1b6664f904cd104a67bb7610 Author: Rong Rong <ro...@apache.org> AuthorDate: Fri Oct 13 08:59:27 2023 -0700 [UI] use indexes API instead of fetching all segment metadata (#11793) * [UI] use indexes API instead of segments --------- Co-authored-by: Rong Rong <ro...@startree.ai> --- .../app/components/Homepage/Operations/ReloadStatusOp.tsx | 12 +++++------- pinot-controller/src/main/resources/app/requests/index.ts | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pinot-controller/src/main/resources/app/components/Homepage/Operations/ReloadStatusOp.tsx b/pinot-controller/src/main/resources/app/components/Homepage/Operations/ReloadStatusOp.tsx index 2d3b643540..696b23fc20 100644 --- a/pinot-controller/src/main/resources/app/components/Homepage/Operations/ReloadStatusOp.tsx +++ b/pinot-controller/src/main/resources/app/components/Homepage/Operations/ReloadStatusOp.tsx @@ -75,8 +75,8 @@ export default function ReloadStatusOp({ hideModal }: Props) { const classes = useStyles(); - const segmentNames = reloadStatusData && Object.keys(reloadStatusData); - const indexes = reloadStatusData && reloadStatusData[segmentNames[0]]?.indexes; + const reloadStatusKey = "columnToIndexesCount" + const indexes = reloadStatusData && reloadStatusData[reloadStatusKey]; const indexesKeys = indexes && Object.keys(indexes); const indexObjKeys = indexes && indexes[indexesKeys[0]] && Object.keys(indexes[indexesKeys[0]]) || []; const [activeTab, setActiveTab] = useState(0); @@ -230,12 +230,10 @@ export default function ReloadStatusOp({ </StyledTableCell> {indexObjKeys.map((o, i)=>{ let iconElement = null; - if(indexObj[o].toLowerCase() === 'yes'){ - iconElement = <CheckIcon className={classes.greenColor}/>; - } else if(indexObj[o].toLowerCase() === 'no'){ + if(indexObj[o] === 0){ iconElement = <CloseIcon className={classes.redColor}/>; } else { - iconElement = indexObj[o]; + iconElement = <CheckIcon className={classes.greenColor}/>; } return ( <StyledTableCell align="center" key={i}> @@ -250,7 +248,7 @@ export default function ReloadStatusOp({ </Table> </TableContainer> : - <DialogContentText>No segment found in table.</DialogContentText> + <DialogContentText>No reload status found in table.</DialogContentText> } </TabPanel> <CustomDialog diff --git a/pinot-controller/src/main/resources/app/requests/index.ts b/pinot-controller/src/main/resources/app/requests/index.ts index 23727ca10f..7da6cb6683 100644 --- a/pinot-controller/src/main/resources/app/requests/index.ts +++ b/pinot-controller/src/main/resources/app/requests/index.ts @@ -198,7 +198,7 @@ export const reloadAllSegments = (tableName: string, tableType: string): Promise baseApi.post(`/segments/${tableName}/reload?type=${tableType}`, null, {headers}); export const reloadStatus = (tableName: string, tableType: string): Promise<AxiosResponse<OperationResponse>> => - baseApi.get(`/segments/${tableName}/metadata?type=${tableType}&columns=*`); + baseApi.get(`/tables/${tableName}/indexes?type=${tableType}`); export const deleteSegment = (tableName: string, instanceName: string): Promise<AxiosResponse<OperationResponse>> => baseApi.delete(`/segments/${tableName}/${instanceName}`, {headers}); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org