salopensource / sal

Modular reporting for Endpoints
Apache License 2.0
212 stars 64 forks source link

Fix DataTables warning on manage_users.html #457

Closed w0de closed 1 year ago

w0de commented 1 year ago

DataTables added this warning on Oct 22, 2022 (later released in DataTables >=1.13.2):

Screenshot 2023-10-12 at 5 05 51 PM

It occurs when the header column count != a row's column count. It started occurring on Sal's manage_users.html after DataTables was updated to 1.13.5. It does not occur if this commit is reverted.

It appears no other table triggers the warning. I checked tables in these templates:

✗ grep "DataTable(" -r ./**/templates/*
./licenses/templates/licenses/index.html:        $('.groupList').DataTable({
./server/templates/server/plugins.html:    $('.groupList').DataTable({
./server/templates/server/machine_detail_plugins.html:    $('.groupList').DataTable({
./server/templates/server/manage_users.html:        $('.groupList').DataTable({
./server/templates/server/machine_detail_facts.html:        $('.groupList').DataTable({
./server/templates/server/api_keys.html:        $('.groupList').DataTable({
./server/templates/server/reports.html:    $('.groupList').DataTable({

I noticed the invocation in server/templates/server/settings.html doesn't appear to be used - there's no table rendered on the page (and no other template extends settings.html per grep 'extends "settings.html"' -r .). Deleted it. Lmk if this is incorrect, ofc.

Edit: I don't think this CI error is related to the delta:

Screenshot 2023-10-12 at 5 48 23 PM