Bug #26494
openInventory tables takes significant storage leading to QuotaExceededError with many nodes
Description
When using the technique editor, I could end-up not being able to edit drafts, and I receive an error notification with a QuotaExceededError
in the details, suggesting that I'm out of storage in the browser.
This is likely due to accumulated data in localStorage : when consulting the node details page of a node for the first time, opening the page leads to several data added to the localstorage, corresponding to an empty state of the bios, processors, net, var, os, storages, process, logsGrid, fs, softUpdates, controllers, etc.
All data is added in batch, this is due to using the DataTables library and displaying all tables as soon as the page is rendered, even if the "Inventory" tab and specific table has not been clicked in the browser.
Proposed solution :
We should make this lazy, at least by rendering the table data with AJAX instead of rendering it on the server-side page : https://github.com/Normation/rudder/blob/branches/rudder/8.1/webapp/sources/rudder/rudder-web/src/main/scala/com/normation/rudder/web/services/DisplayNode.scala#L420.
We could also do storage optimization in https://github.com/Normation/rudder/blob/branches/rudder/8.1/webapp/sources/rudder/rudder-web/src/main/javascript/rudder/rudder-datatable.js#L2423, but it could lead to compatibility issues and duplication, especially if we want to migrate away from DataTables.
Workaround is to empty the localStorage : localStorage.clear()
in the browser console.