mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Fix: Sort truenas pools by name (#3669)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
b03467a832
commit
6ed4472441
@ -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…
x
Reference in New Issue
Block a user