fix sorting #402
This commit is contained in:
parent
790bb08718
commit
da7ededfb1
|
@ -285,7 +285,9 @@ export default function () {
|
||||||
|
|
||||||
if (state.clientTreeSort === "alphafail") {
|
if (state.clientTreeSort === "alphafail") {
|
||||||
// move failing clients to the top
|
// move failing clients to the top
|
||||||
const sortedByFailing = output.sort(a => a.color === "negative" ? -1 : 1);
|
const failing = output.filter(i => i.color === "negative" || i.color === "warning");
|
||||||
|
const ok = output.filter(i => i.color !== "negative" && i.color !== "warning");
|
||||||
|
const sortedByFailing = [...failing, ...ok];
|
||||||
commit("loadTree", sortedByFailing);
|
commit("loadTree", sortedByFailing);
|
||||||
} else {
|
} else {
|
||||||
commit("loadTree", output);
|
commit("loadTree", output);
|
||||||
|
|
Loading…
Reference in New Issue