Skip to content

Commit

Permalink
"Show only given columns" now does what you'd think for html_fancy te…
Browse files Browse the repository at this point in the history
…mplates.
  • Loading branch information
fboender committed Nov 17, 2018
1 parent 7f556ab commit f16411a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ansiblecmdb/data/tpl/html_fancy_defs.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@
{"title": "Product Serial","id": "prodserial", "func": col_prodserial, "sType": "string", "visible": False},
]

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

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

0 comments on commit f16411a

Please sign in to comment.