Skip to content

Commit

Permalink
ElectronPlatform: Add the ability to load file events from the event …
Browse files Browse the repository at this point in the history
…index.
  • Loading branch information
poljar committed Jan 17, 2020
1 parent e3b4f18 commit a2e256b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions electron_app/src/electron-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,18 @@ ipcMain.on('seshat', async function(ev, payload) {
}
break;

case 'loadFileEvents':
if (eventIndex === null) ret = [];
else {
try {
ret = await eventIndex.loadFileEvents(args[0]);
} catch (e) {
sendError(payload.id, e);
return;
}
}
break;

case 'loadCheckpoints':
if (eventIndex === null) ret = [];
else {
Expand Down
4 changes: 4 additions & 0 deletions src/vector/platform/ElectronPlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ class SeshatIndexManager extends BaseEventIndexManager {
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
}

async loadFileEvents(args): Promise<[EventAndProfile]> {
return this._ipcCall('loadFileEvents', args);
}

async loadCheckpoints(): Promise<[CrawlerCheckpoint]> {
return this._ipcCall('loadCheckpoints');
}
Expand Down

0 comments on commit a2e256b

Please sign in to comment.