Skip to content

Commit a2e256b

Browse files
committed
ElectronPlatform: Add the ability to load file events from the event index.
1 parent e3b4f18 commit a2e256b

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎electron_app/src/electron-main.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,18 @@ ipcMain.on('seshat', async function(ev, payload) {
370370
}
371371
break;
372372

373+
case 'loadFileEvents':
374+
if (eventIndex === null) ret = [];
375+
else {
376+
try {
377+
ret = await eventIndex.loadFileEvents(args[0]);
378+
} catch (e) {
379+
sendError(payload.id, e);
380+
return;
381+
}
382+
}
383+
break;
384+
373385
case 'loadCheckpoints':
374386
if (eventIndex === null) ret = [];
375387
else {

‎src/vector/platform/ElectronPlatform.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ class SeshatIndexManager extends BaseEventIndexManager {
144144
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
145145
}
146146

147+
async loadFileEvents(args): Promise<[EventAndProfile]> {
148+
return this._ipcCall('loadFileEvents', args);
149+
}
150+
147151
async loadCheckpoints(): Promise<[CrawlerCheckpoint]> {
148152
return this._ipcCall('loadCheckpoints');
149153
}

0 commit comments

Comments
 (0)