-
Notifications
You must be signed in to change notification settings - Fork 11
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: use DC and Rack from Location for nodes #713
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
@@ -34,7 +33,7 @@ export const FullNodeViewer = ({node, className}: FullNodeViewerProps) => { | |||
commonInfo.push( | |||
{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
@@ -12,6 +12,8 @@ const prepareComputeNode = (node: TComputeNodeInfo, tenantName?: string) => { | |||
TenantName: node.Tenant ?? tenantName, | |||
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
DataCenter
field. However, in code we reference it asDC
, also backend sort works only with field short name. So replacedDataCenter
field withDC
everywhere, useDataCenter
andRack
from nodeLocation
field, where it's possible (it's not present in/viewer/json/compute
endpoint)DC
andRack
should 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