Opened on 03/29/2017 at 11:12:36 AM
Closed on 04/05/2017 at 12:19:04 PM
Last modified on 04/08/2017 at 06:58:20 AM
#5052 closed change (fixed)
Allow importing and exporting filterStorage data without file access
Reported by: | trev | Assignee: | trev |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | Core | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #5051, #5059 | Platform: | Unknown / Cross platform |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Background
In #5051 we will move file access for custom backups outside filterStorage.js. The public API needs to be adjusted in order to support this.
What to change
- Rename FilterStorage._generateFilterData method into FilterStorage.exportData.
- Add FilterStorage.importData method returning a function to be called for each line and then with null to finalize import (import can be aborted by "forgetting" this function before the final call).
- Remove parameters of FilterStorage.loadFromDisk and FilterStorage.saveToDisk methods, these are always dealing with the default file now.
- Make FilterStorage.loadFromDisk call FilterStorage.importData for most of its work.
Attachments (0)
Change History (10)
comment:1 Changed on 03/30/2017 at 05:48:43 AM by trev
- Blocking 5059 added
comment:2 Changed on 03/30/2017 at 10:56:20 AM by trev
- Owner set to trev
comment:3 Changed on 03/30/2017 at 12:22:36 PM by trev
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:4 Changed on 03/30/2017 at 04:38:00 PM by abpbot
comment:5 Changed on 03/30/2017 at 04:38:28 PM by trev
- Resolution set to fixed
- Status changed from reviewing to closed
comment:6 Changed on 03/30/2017 at 04:51:47 PM by trev
- Resolution fixed deleted
- Status changed from closed to reopened
Let's reopen this - unit tests are broken, these need to be updated.
comment:7 Changed on 04/05/2017 at 12:15:12 PM by abpbot
A commit referencing this issue has landed:
Issue 5052 - Adjust filter storage unit tests for API changes
comment:8 Changed on 04/05/2017 at 12:19:04 PM by trev
- Resolution set to fixed
- Status changed from reopened to closed
comment:9 Changed on 04/08/2017 at 05:29:43 AM by kzar
I think these changes have now caused an ESLint error, getting a no-unused-vars error for test/filterStorage_readWrite.js now.
comment:10 Changed on 04/08/2017 at 06:58:20 AM by trev
Indeed, Subscription class is no longer used.
Note: See
TracTickets for help on using
tickets.
A commit referencing this issue has landed:
Issue 5052 - Allow importing and exporting filterStorage data without file access