-
Notifications
You must be signed in to change notification settings - Fork 17
fix: use DC and Rack from Location for nodes #713
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
Conversation
| import type {TEvSystemStateResponse} from '../../../types/api/systemState'; | ||
| import type {PreparedNode} from './types'; | ||
|
|
||
| export const prepareNodeData = (data: TEvSystemStateResponse): PreparedNode => { |
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.
Although is looks similar to other nodes preparation functions, it's different endpoint - /viewer/json/sysinfo, so there should be different handler
6b691e4 to
129386d
Compare
| {label: 'Version', value: node?.Version}, | ||
| {label: 'Uptime', value: calcUptime(node?.StartTime)}, | ||
| {label: 'DC', value: node?.DataCenterDescription}, | ||
| {label: 'DC', value: node?.DataCenterDescription || node?.DC}, |
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.
DataCenterDescription has more data, but it could be empty and short DC name should be used in this case
129386d to
51bfcab
Compare
| SystemState: node?.Overall, | ||
| Uptime: calcUptime(node?.StartTime), | ||
|
|
||
| DC: node.DataCenter, |
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 don't have Location filed in viewer/json/compute
51bfcab to
47136a3
Compare
In raw data we have
DataCenterfield. However, in code we reference it asDC, also backend sort works only with field short name. So replacedDataCenterfield withDCeverywhere, useDataCenterandRackfrom nodeLocationfield, where it's possible (it's not present in/viewer/json/computeendpoint)DCandRackshould appear in Node page, in Nodes and Storage tables, also sort by DC in Nodes and Storage tables now should work properly (experiment "Use table with data load on scroll for Nodes and Storage tabs" should be turned off).Node page:

Nodes table:

Node to test UI: https://nda.ya.ru/t/se1OYEka74Uxro