smengcl commented on a change in pull request #1937:
URL: https://github.com/apache/ozone/pull/1937#discussion_r580598604
##########
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:
@vivekratnavel Yes, good point.
I'm checking if type `exclamation-circle` works for `DECOMMISSIONED` and
`IN_MAINTENANCE` visually.
Do you have any suggestions on that? Any other presets for me to use?
----------------------------------------------------------------
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]