Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(UptimeViewer): do not show StartTime if DisconnectTime present #1864

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Jan 21, 2025

Closes #1858

CI Results

Test Status: ❌ FAILED

πŸ“Š Full Report

Total Passed Failed Flaky Skipped
262 260 1 1 0

😟 No changes in tests. πŸ˜•

Bundle Size: βœ…

Current: 80.06 MB | Main: 80.06 MB
Diff: 0.04 KB (-0.00%)

βœ… Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • πŸ“Š indicates links to detailed reports.
  • πŸ”Ί indicates increase, πŸ”½ decrease, and βœ… no change in bundle size.

Comment on lines -33 to -46
content={
<DefinitionList responsive>
{StartTime ? (
<DefinitionList.Item key={'StartTime'} name={i18n('start-time')}>
{formatDateTime(StartTime, {withTimeZone: true})}
</DefinitionList.Item>
) : null}
{DisconnectTime ? (
<DefinitionList.Item key={'DisconnectTime'} name={i18n('disconnect-time')}>
{formatDateTime(DisconnectTime, {withTimeZone: true})}
</DefinitionList.Item>
) : null}
</DefinitionList>
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously I assumed, that if node is disconnected, there will be no StartTime in the response. However, StartTime may be cached somewhere on backend and we could receive both StartTime and DisconnectTime for disconnected node, in this case we have both values in the tooltip with different timestamps. After this fix StartTime will be in popover only if there is no DisconnectTime

@artemmufazalov artemmufazalov marked this pull request as ready for review January 22, 2025 13:52
) : null}
</DefinitionList>
}
content={<DefinitionList responsive>{content}</DefinitionList>}
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add a case if content is null

Copy link
Member Author

Choose a reason for hiding this comment

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

Disabled popup if no content

@artemmufazalov artemmufazalov added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit 36038bc Jan 22, 2025
4 of 5 checks passed
@artemmufazalov artemmufazalov deleted the 1858-uptime-popup branch January 22, 2025 15:07
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.

Do not show StartTime in Uptime popup if there is DisconnectTime
2 participants