briangann / grafana-datatable-panel

Datatables.net based panel for Grafana
Apache License 2.0
83 stars 58 forks source link

Add option to prevent warning generation on null/undefined values #155

Closed lvta0909 closed 2 years ago

lvta0909 commented 2 years ago

Datatables throws a warning when trying to render null or undefined values (https://datatables.net/manual/tech-notes/4). On transforming NoSQL data to table form this can be a nuisance as some "columns" may not be present on every "row".

Added an option (style.ignoreNull) under "Column Styles" to prevent this warning and substitute the undefined value with '-' using DefaultContent option from DataTables (https://datatables.net/reference/option/columns.defaultContent)

zy286938348 commented 2 years ago

DataTables warning: table id=datatable-panel-table-2 - Requested unknown parameter {function} for row 4, column 5. For more information about this error, please see http://datatables.net/tn/4

have you encountered this problem?

briangann commented 2 years ago

thanks for the contribution, merging and will release soon!