diff --git a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodePage.tsx b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodePage.tsx index 58bfc2d71..30a7cabf9 100644 --- a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodePage.tsx +++ b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodePage.tsx @@ -44,16 +44,14 @@ export const NodePage: React.FC = ({ nodeRewards, periodFilter }) const rewardsPercent = Math.round(nodeMetrics.rewards_percent * 100); const rewardsReduction = 100 - rewardsPercent; - let index = 0; - const rows: GridRowsProp = nodeMetrics.daily_node_metrics.map((data) => { - index = index + 1; + const rows: GridRowsProp = nodeMetrics.daily_node_metrics.map((data, index) => { return { - id: index, + id: index + 1, col1: new Date(Number(data.ts) / 1000000), - col2: data.num_blocks_proposed, - col3: data.num_blocks_failed, + col2: Number(data.num_blocks_proposed), + col3: Number(data.num_blocks_failed), col4: data.failure_rate, - col5: data.subnet_assigned, + col5: data.subnet_assigned.toText(), }; }); diff --git a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderPage.tsx b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderPage.tsx index 052981da0..dc1b7e84a 100644 --- a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderPage.tsx +++ b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderPage.tsx @@ -39,11 +39,11 @@ export const NodeProviderPage: React.FC = ({ nodeRewards, return { id: index, col1: new Date(Number(data.ts) / 1000000), - col2: nodeRewards.node_id, - col3: data.num_blocks_proposed, - col4: data.num_blocks_failed, + col2: nodeRewards.node_id.toText(), + col3: Number(data.num_blocks_proposed), + col4: Number(data.num_blocks_failed), col5: data.failure_rate, - col6: data.subnet_assigned, + col6: data.subnet_assigned.toText(), }; }) });