-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: add absolute timestamp to uptime #1768
Conversation
let Uptime: PreparedNodeSystemState['Uptime']; | ||
|
||
if (systemState.DisconnectTime) { | ||
Uptime = getDowntimeFromDateFormatted(systemState.DisconnectTime); | ||
} else { | ||
Uptime = getUptimeFromDateFormatted(systemState.StartTime); | ||
} | ||
|
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.
It's more about display, moved it to NodeUptime
component
b5699d7
to
1b7b4b7
Compare
display: inline-flex; | ||
|
||
max-width: 100%; | ||
|
||
&_full-width { | ||
display: flex; | ||
} | ||
|
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.
We need flex
to display progress bars correctly, for other values we need inline-flex
for proper align inside table
1b7b4b7
to
01181c4
Compare
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.
Copilot reviewed 5 out of 15 changed files in this pull request and generated no comments.
Files not reviewed (10)
- src/components/CellWithPopover/CellWithPopover.scss: Language not supported
- src/components/UptimeViewer/i18n/en.json: Language not supported
- src/components/CellWithPopover/CellWithPopover.tsx: Evaluated as low risk
- src/components/nodesColumns/columns.tsx: Evaluated as low risk
- src/components/TooltipsContent/TabletTooltipContent/TabletTooltipContent.tsx: Evaluated as low risk
- src/containers/Tablet/components/TabletInfo/TabletInfo.tsx: Evaluated as low risk
- src/utils/nodes.ts: Evaluated as low risk
- src/containers/Tablets/TabletsTable.tsx: Evaluated as low risk
- src/containers/Tablet/components/TabletTable/TabletTable.tsx: Evaluated as low risk
- src/utils/dataFormatters/test/formatUptime.test.ts: Evaluated as low risk
Comments suppressed due to low confidence (2)
src/utils/dataFormatters/dataFormatters.ts:49
- Returning
undefined
for non-numeric values informatUptimeInSeconds
may cause issues where a placeholder is expected. Consider returning a consistent placeholder value.
return undefined;
src/components/FullNodeViewer/FullNodeViewer.tsx:36
- The
NodeUptime
component should handle cases where bothStartTime
andDisconnectTime
are undefined. Currently, it returnsEMPTY_DATA_PLACEHOLDER
ifuptime
is not defined, which may not be the desired behavior in all contexts.
value: <NodeUptime StartTime={node?.StartTime} DisconnectTime={node?.DisconnectTime} />,
<CellWithPopover | ||
placement={['top', 'auto']} | ||
content={ | ||
<DefinitionList responsive> |
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.
should we add Popover if nor StartTime neither DisconnectTime is provided?
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.
Uptime won't be calculated in such case (getUptimeFromDateFormatted
return undefined
for undefined
input). I made the code more explicit
Closes #1200
Stand: https://nda.ya.ru/t/bi-P0mBz7AW239
CI Results
Test Status: β PASSED
π Full Report
π No changes in tests. π
Bundle Size: πΊ
Current: 65.89 MB | Main: 65.88 MB
Diff: +5.32 KB (0.01%)
βΉοΈ CI Information