eventlog: make a component and use it in app and system

This commit is contained in:
Girish Ramakrishnan
2026-02-17 14:42:40 +01:00
parent 8d4b458a22
commit 77b7f7bfad
4 changed files with 292 additions and 377 deletions
+2 -2
View File
@@ -313,10 +313,10 @@ function create() {
if (result.status !== 202) return [result];
return [null];
},
async getEvents(id) {
async getEvents(id, filter = {}, page = 1, per_page = 100) {
let result;
try {
result = await fetcher.get(`${API_ORIGIN}/api/v1/apps/${id}/eventlog`, { page: 1, per_page: 100, access_token: accessToken });
result = await fetcher.get(`${API_ORIGIN}/api/v1/apps/${id}/eventlog`, { ...filter, page, per_page, access_token: accessToken });
} catch (e) {
return [e];
}