-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
079b067
to
e72c698
Compare
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> | ||
} |
There was a problem hiding this comment.
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
) : null} | ||
</DefinitionList> | ||
} | ||
content={<DefinitionList responsive>{content}</DefinitionList>} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Closes #1858
CI Results
Test Status: β FAILED
π Full Report
π 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