-
-
Notifications
You must be signed in to change notification settings - Fork 562
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
Set stateDuration to 0 for all saved datatables to store the state indefinitely #1944
Conversation
…definite Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
d423834
to
4254f12
Compare
This reverts commit 2f54f5f. Signed-off-by: Christian König <[email protected]>
This reverts commit 6a3e778. Signed-off-by: Christian König <[email protected]>
4254f12
to
8edba73
Compare
Sorry for the mess - forgot to sign-off one intermediate commit and DCO didn't stop complaining. |
Tried it multiple times >2h and manual changes kept applied. |
Thanks, I meant to pull this earlier to test exactly that, but I've read the documentation and what you've seen matches what we would expect to see, so I am happy to take your word for it |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-12-web-v5-9-and-core-v5-7-released/51795/1 |
git rebase
)git commit --signoff
)What does this PR aim to accomplish?:
We already save the state of the datatables in the local storage. However, we didn't set
stateDuration
explicitly, which make the option default to 7200 seconds (2h).https://datatables.net/reference/option/stateDuration
Afterwards, datatables will consider the state invalid. This means, that despite having chosen non-default options for the datatables (which is still present in the local storage), on load they will fall-back to their default values and overwrite all previously chosen settings.
This has been reported here: #764 (comment)
Additionally, this PR removes some duplicated code that has been moved to the
utils.stateLoadCallback
function before.