Skip to content

Commit

Permalink
Fix export table sorting (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrodimarco-dfinity authored Aug 27, 2024
1 parent c362752 commit 38af8b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ export const NodePage: React.FC<NodePageProps> = ({ 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(),
};
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export const NodeProviderPage: React.FC<NodeProviderPageProps> = ({ 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(),
};
})
});
Expand Down

0 comments on commit 38af8b9

Please sign in to comment.