diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js index 6e477f90..44cbe4f6 100644 --- a/electron_app/src/electron-main.js +++ b/electron_app/src/electron-main.js @@ -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 { diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index 9968504a..6c1d45c2 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -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'); }