mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-01-20 03:50:21 +00:00
fix sorting of clients tree
This commit is contained in:
@@ -253,14 +253,15 @@ export default function () {
|
||||
}
|
||||
|
||||
|
||||
const sorted = output.sort((a, b) => a.label.localeCompare(b.label));
|
||||
if (state.clientTreeSort === "alphafail") {
|
||||
// move failing clients to the top
|
||||
const failing = output.filter(i => i.color === "negative" || i.color === "warning");
|
||||
const ok = output.filter(i => i.color !== "negative" && i.color !== "warning");
|
||||
const failing = sorted.filter(i => i.color === "negative" || i.color === "warning");
|
||||
const ok = sorted.filter(i => i.color !== "negative" && i.color !== "warning");
|
||||
const sortedByFailing = [...failing, ...ok];
|
||||
commit("loadTree", sortedByFailing);
|
||||
} else {
|
||||
commit("loadTree", output);
|
||||
commit("loadTree", sorted);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user