smengcl commented on a change in pull request #1937:
URL: https://github.com/apache/ozone/pull/1937#discussion_r581329758
##########
File path:
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
##########
@@ -85,28 +93,50 @@ interface IDatanodesState {
columnOptions: IOption[];
}
-const renderDatanodeStatus = (status: DatanodeStatus) => {
- const statusIconMap = {
+const renderDatanodeState = (state: DatanodeState) => {
+ const stateIconMap = {
HEALTHY: <Icon type='check-circle' theme='filled' twoToneColor='#1da57a'
className='icon-success'/>,
STALE: <Icon type='hourglass' theme='filled' className='icon-warning'/>,
- DEAD: <Icon type='close-circle' theme='filled' className='icon-failure'/>,
- DECOMMISSIONING: <Icon type='warning' theme='filled'
className='icon-warning'/>,
- DECOMMISSIONED: <Icon type='exclamation-circle' theme='filled'
className='icon-failure'/>
+ DEAD: <Icon type='close-circle' theme='filled' className='icon-failure'/>
};
- const icon = status in statusIconMap ? statusIconMap[status] : '';
- return <span>{icon} {status}</span>;
+ const icon = state in stateIconMap ? stateIconMap[state] : '';
+ return <span>{icon} {state}</span>;
+};
+
+const renderDatanodeOpState = (opState: DatanodeOpState) => {
+ const opStateIconMap = {
+ IN_SERVICE: <Icon type='check-circle' theme='filled'
twoToneColor='#1da57a' className='icon-success'/>,
+ DECOMMISSIONING: <Icon type='hourglass' theme='filled'
className='icon-warning'/>,
+ DECOMMISSIONED: <Icon type='check-circle' theme='filled'
className='icon-success'/>,
+ ENTERING_MAINTENANCE: <Icon type='hourglass' theme='filled'
className='icon-warning'/>,
+ IN_MAINTENANCE: <Icon type='check-circle' theme='filled'
className='icon-success'/>
+ };
Review comment:
done. the icon should look like this now:
<img width="29" alt="Screen Shot 2021-02-23 at 11 20 14 AM"
src="https://user-images.githubusercontent.com/50227127/108897252-bf676500-75ca-11eb-87f3-994397b4d60e.png">
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]