api: disk list: sort by name
So callers get more stable results. Most noticeable, the disk list in the web UI doesn't jump around upon reloading, and while sorting could be done directly there, like this other callers get the benefit too. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> (cherry picked from commit bbff317aa7b183ce58a52df35d58997f2203c8d7) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
dd749b0e47
commit
dac877252b
@ -66,6 +66,8 @@ pub fn list_disks(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.sort_by(|a, b| a.name.cmp(&b.name));
|
||||||
|
|
||||||
Ok(list)
|
Ok(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user