vivekratnavel commented on a change in pull request #1937:
URL: https://github.com/apache/ozone/pull/1937#discussion_r580565951
##########
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:
We are showing a green check circle for "DECOMMISSIONED" and
"IN_MAINTENANCE" operational states.
I am not sure if we should differentiate these two from the "IN_SERVICE"
state by showing these states in yellow warning signs. Or some other status
icon to grab the user's attention to these states maybe?
What do you think?
----------------------------------------------------------------
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]