Fix: Sort truenas pools by name (#3669)

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
pull/3679/head
Mark Titorenkov 5 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 })} /> <Block label="truenas.alerts" value={t("common.number", { value: alertData.pending })} />
</Container> </Container>
{enablePools && {enablePools &&
poolsData.map((pool) => ( poolsData
<Pool .sort((a, b) => a.name.localeCompare(b.name))
key={pool.id} .map((pool) => (
name={pool.name} <Pool
healthy={pool.healthy} key={pool.id}
allocated={pool.allocated} name={pool.name}
free={pool.free} healthy={pool.healthy}
data={pool.data} allocated={pool.allocated}
nasType={widget?.nasType ?? "scale"} free={pool.free}
/> data={pool.data}
))} nasType={widget?.nasType ?? "scale"}
/>
))}
</> </>
); );
} }

Loading…
Cancel
Save