Hot nodes pools usage - GUI hot node pools usage charts (pools sorted alphabetically)
@@ -29,11 +29,14 @@ function PoolSelector ({
onChange && onChange(Number(key));
};
const renderOverlay = () => {
+ const sorted = (pools || [])
+ .sort((a, b) => (a.name || '').localeCompare(b.name || ''));
return (
<Menu
onClick={onSelectChange}
>
- {(pools || []).map((pool) => (
+ {
+ sorted.map((pool) => (
<Menu.Item key={`${pool.id}`}>
{Number(pool.id) === Number(value)
? <Icon type="check" />
@@ -43,7 +46,8 @@ function PoolSelector ({
{pool.name}
</span>
</Menu.Item>
- ))}
+ ))
+ }
</Menu>
);
};
