Commit Graph

4 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
c28ef62f07 Import and export Logs
Summary: This diff adds import and export support for the logs plugin

Reviewed By: danielbuechele

Differential Revision: D13958713

fbshipit-source-id: a072de025f0b959302175ef0ccaf763ca41377e9
2019-02-12 02:47:55 -08:00
Pritesh Nandgaonkar
e5151b9994 Add salt to the exported device serial id
Summary:
This diff solves the following bug.

When the user imports the exported flipper data for the device which is currently running, there was a bug. A duplicate device with the same serial got created after importing the file. Due to the same `device_id`, the plugins of the exported device got imported in the already running device(which has the same device id).

To solve this problem, I have prefixed the exported `device_id` with a random string, so that the exported device is unique across the device list in the Flipper app.

Look at the vide to understand the bug

Also updated the test case accordingly

Reviewed By: danielbuechele

Differential Revision: D13973180

fbshipit-source-id: df6ee00987e81923914855cea4d76e2bd7167358
2019-02-12 02:47:55 -08:00
Pritesh Nandgaonkar
dc9160d05c Use Archived device for test, as IOSDevice registers for log listeners and spits errors in tests
Summary:
Instead of using IOSDevice, used ArchivedDevice, as it doesn't instantiate the loglistener which printed erros in the console when one ran the tests.

Look at the attached task.

Reviewed By: passy

Differential Revision: D13941803

fbshipit-source-id: 3e504a02522719985afaad25caf4d2a576bfc338
2019-02-05 09:36:35 -08:00
Pritesh Nandgaonkar
9bc54597cf Import from exported file
Summary:
This diff adds the feature to import the exported flipper data. It has the following features

- Dialog to select the file
- Merges the data with an existing store.

Reviewed By: danielbuechele

Differential Revision: D13901944

fbshipit-source-id: 1b9755735419732a34254bdc39d911bcb51ad8fe
2019-02-05 09:36:35 -08:00