Skip to content

Commit f16411a

Browse files
committed
"Show only given columns" now does what you'd think for html_fancy templates.
1 parent 7f556ab commit f16411a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ansiblecmdb/data/tpl/html_fancy_defs.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,9 @@
4646
{"title": "Product Serial","id": "prodserial", "func": col_prodserial, "sType": "string", "visible": False},
4747
]
4848

49-
# Enable columns specified with '--columns'
49+
# Include only given columns if -c / --columns is given
5050
if cols_visible is not None:
51-
for col in cols:
52-
if col["id"] in cols_visible:
53-
col["visible"] = True
54-
else:
55-
col["visible"] = False
51+
cols = list(filter(lambda col: col["id"] in cols_visible, cols))
5652

5753
# Remove columns that should be excluded if --exclude-cols is given
5854
if cols_exclude is not None:

0 commit comments

Comments
 (0)