mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
wallboard: fix stuck page without filter query
if no filter param is provided, use a copy of the jobs array to avoid an infinite sort loop in the frontend resolves #174
This commit is contained in:
parent
e7defa9f15
commit
01183a3c25
@ -543,7 +543,7 @@ const All = templateId => {
|
|||||||
if (expr)
|
if (expr)
|
||||||
ret = state.jobs.filter(job => (new RegExp(expr)).test(job.name));
|
ret = state.jobs.filter(job => (new RegExp(expr)).test(job.name));
|
||||||
else
|
else
|
||||||
ret = state.jobs;
|
ret = [...state.jobs];
|
||||||
// sort failed before success, newest first
|
// sort failed before success, newest first
|
||||||
ret.sort((a,b) => a.result == b.result ? a.started - b.started : 2*(b.result == 'success')-1);
|
ret.sort((a,b) => a.result == b.result ? a.started - b.started : 2*(b.result == 'success')-1);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user