Fix: Sort truenas pools by name (#3669)

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
pull/3679/head
Mark Titorenkov 6 months ago committed by GitHub
parent b03467a832
commit 6ed4472441
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -39,17 +39,19 @@ export default function Component({ service }) {
<Block label="truenas.alerts" value={t("common.number", { value: alertData.pending })} />
</Container>
{enablePools &&
poolsData.map((pool) => (
<Pool
key={pool.id}
name={pool.name}
healthy={pool.healthy}
allocated={pool.allocated}
free={pool.free}
data={pool.data}
nasType={widget?.nasType ?? "scale"}
/>
))}
poolsData
.sort((a, b) => a.name.localeCompare(b.name))
.map((pool) => (
<Pool
key={pool.id}
name={pool.name}
healthy={pool.healthy}
allocated={pool.allocated}
free={pool.free}
data={pool.data}
nasType={widget?.nasType ?? "scale"}
/>
))}
</>
);
}

Loading…
Cancel
Save