1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

enable expand/collapse all tasks button in job result page

This commit is contained in:
Haokun-Chen 2018-06-20 14:30:35 -04:00
parent 37d61904bf
commit daf3215241
No known key found for this signature in database
GPG Key ID: B2AA94BEF6591515

View File

@ -142,10 +142,8 @@ function toggleMenuExpand () {
if (scroll.isPaused()) return; if (scroll.isPaused()) return;
const recordList = Object.keys(render.record).map(key => render.record[key]); const recordList = Object.keys(render.record).map(key => render.record[key]);
const minLevel = Math.min(...recordList.map(({ level }) => level));
const toggled = recordList const toggled = recordList
.filter(({ level }) => level === minLevel)
.map(({ uuid }) => getToggleElements(uuid)) .map(({ uuid }) => getToggleElements(uuid))
.filter(({ icon }) => icon.length > 0) .filter(({ icon }) => icon.length > 0)
.map(({ icon, lines }) => setExpanded(icon, lines, !vm.isMenuExpanded)); .map(({ icon, lines }) => setExpanded(icon, lines, !vm.isMenuExpanded));