Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button for exporting tables as csv #429

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Update _macros.html
  • Loading branch information
emlun007 authored Feb 14, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit f9edc836deae394b416a84572637a9e66b9d72eb
14 changes: 13 additions & 1 deletion puppetboard/templates/_macros.html
Original file line number Diff line number Diff line change
@@ -56,7 +56,19 @@
"search": {"regex": true},
// Default sort
"order": [[ 0, "desc" ]],
// Custom options
// Rendering - add rendering options for columns
"columnDefs": [ {
"targets": -1,
"data:": null,
"render": function (data, type, full, meta) {
shorta = data.replace(/[{},]/g, "<br />");
shortb = shorta.replace(/u'/g, " ");
shortc = shortb.replace(/'/g, " ");
return shortc;
}}],
// Custom options
{% if extra_options %}{% call extra_options() %}Callback to parent defined options{% endcall %}{% endif %}
});
{% if extra_options %}{% call extra_options() %}Callback to parent defined options{% endcall %}{% endif %}
});