Skip to content

Conversation

@runitao
Copy link
Contributor

@runitao runitao commented Jul 15, 2020

What changes were proposed in this pull request?

Display more accurate timestamp in recon Web. Currently the web only show timestamp in minutes.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-3960

How was this patch tested?

Test with pnpm run dev

Here is the result with this patch.
image

@vivekratnavel vivekratnavel self-requested a review July 15, 2020 04:33
Copy link
Contributor

@vivekratnavel vivekratnavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM except for the timestamp format.

sorter: (a: IDatanode, b: IDatanode) => a.lastHeartbeat - b.lastHeartbeat,
render: (heartbeat: number) => {
return heartbeat > 0 ? moment(heartbeat).format('lll') : 'NA';
return heartbeat > 0 ? moment(heartbeat).format('YYYY/MM/DD HH:mm:ss') : 'NA';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ll LTS?

Suggested change
return heartbeat > 0 ? moment(heartbeat).format('YYYY/MM/DD HH:mm:ss') : 'NA';
return heartbeat > 0 ? moment(heartbeat).format('ll LTS') : 'NA';

sorter: (a: IDatanode, b: IDatanode) => a.setupTime - b.setupTime,
render: (uptime: number) => {
return uptime > 0 ? moment(uptime).format('lll') : 'NA';
return uptime > 0 ? moment(uptime).format('YYYY/MM/DD HH:mm:ss') : 'NA';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return uptime > 0 ? moment(uptime).format('YYYY/MM/DD HH:mm:ss') : 'NA';
return uptime > 0 ? moment(uptime).format('ll LTS') : 'NA';

key: 'lastLeaderElection',
render: (lastLeaderElection: number) => lastLeaderElection > 0 ?
moment(lastLeaderElection).format('lll') : 'NA',
moment(lastLeaderElection).format('YYYY/MM/DD HH:mm:ss') : 'NA',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
moment(lastLeaderElection).format('YYYY/MM/DD HH:mm:ss') : 'NA',
moment(lastLeaderElection).format('ll LTS') : 'NA',

const lastUpdatedText = lastUpdated === 0 ? 'NA' :
(
<Tooltip
placement='bottom' title={moment(lastUpdated).format('lll')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also update the tooltip to include seconds?

Suggested change
placement='bottom' title={moment(lastUpdated).format('lll')}
placement='bottom' title={moment(lastUpdated).format('ll LTS')}

@runitao
Copy link
Contributor Author

runitao commented Jul 15, 2020

Thanks @vivekratnavel for review. I have changed the timestamp format.

image

Copy link
Contributor

@vivekratnavel vivekratnavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@adoroszlai adoroszlai merged commit da49ca6 into apache:master Jul 15, 2020
@adoroszlai
Copy link
Contributor

Thanks @runitao for the improvement and @vivekratnavel for the review.

ChenSammi pushed a commit that referenced this pull request Jul 22, 2020
@runitao runitao changed the title HDDS-3798. Display more accurate timestamp in recon Web HDDS-3960. Display more accurate timestamp in recon Web Jul 23, 2020
avijayanhwx pushed a commit to avijayanhwx/hadoop-ozone that referenced this pull request Aug 10, 2020
rakeshadr pushed a commit to rakeshadr/hadoop-ozone that referenced this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants