From d01ef49ba6d88c0a00b0e784e73a1170436faa9f Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 16 Aug 2019 15:18:20 -0300 Subject: [PATCH] 15407: Fixes node's properties & info handling. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- src/models/node.ts | 16 ++++++------- .../attributes-dialog.tsx | 24 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/models/node.ts b/src/models/node.ts index 87238115..d0232b83 100644 --- a/src/models/node.ts +++ b/src/models/node.ts @@ -18,17 +18,17 @@ export interface NodeResource extends Resource { } export interface NodeInfo { - lastAction: string; - pingSecret: string; - ec2InstanceId: string; - slurmState?: string; + last_action: string; + ping_secret: string; + ec2_instance_id: string; + slurm_state?: string; } export interface NodeProperties { - cloudNode: CloudNode; - totalRamMb: number; - totalCpuCores: number; - totalScratchMb: number; + cloud_node: CloudNode; + total_ram_mb: number; + total_cpu_cores: number; + total_scratch_mb: number; } interface CloudNode { diff --git a/src/views-components/compute-nodes-dialog/attributes-dialog.tsx b/src/views-components/compute-nodes-dialog/attributes-dialog.tsx index 41ca6395..5d9946b4 100644 --- a/src/views-components/compute-nodes-dialog/attributes-dialog.tsx +++ b/src/views-components/compute-nodes-dialog/attributes-dialog.tsx @@ -29,7 +29,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, grid: { padding: '8px 0 0 0' - } + } }); interface AttributesComputeNodeDialogDataProps { @@ -81,35 +81,35 @@ const renderPrimaryInfo = (computeNode: NodeResource, classes: any) => { }; const renderInfo = (info: NodeInfo, classes: any) => { - const { lastAction, pingSecret, ec2InstanceId, slurmState } = info; + const { last_action, ping_secret, ec2_instance_id, slurm_state } = info; return ( Info - Last action - {lastAction || '(none)'} + {last_action || '(none)'} Info - Ping secret - {pingSecret || '(none)'} + {ping_secret || '(none)'} Info - ec2 instance id - {ec2InstanceId || '(none)'} + {ec2_instance_id || '(none)'} Info - Slurm state - {slurmState || '(none)'} + {slurm_state || '(none)'} ); }; const renderProperties = (properties: NodeProperties, classes: any) => { - const { totalRamMb, totalCpuCores, totalScratchMb, cloudNode } = properties; + const { total_ram_mb, total_cpu_cores, total_scratch_mb, cloud_node } = properties; return ( Properties - Total ram mb - {totalRamMb || '(none)'} + {total_ram_mb || '(none)'} Properties - Total scratch mb - {totalScratchMb || '(none)'} + {total_scratch_mb || '(none)'} Properties - Total cpu cores - {totalCpuCores || '(none)'} + {total_cpu_cores || '(none)'} Properties - Cloud node size - {cloudNode ? cloudNode.size : '(none)'} + {cloud_node ? cloud_node.size : '(none)'} Properties - Cloud node price - {cloudNode ? cloudNode.price : '(none)'} + {cloud_node ? cloud_node.price : '(none)'} ); }; \ No newline at end of file -- 2.30.2