Add anlytics info and search to logs page

This commit is contained in:
Peter Stockings
2025-07-25 15:46:56 +10:00
parent 8f2838f920
commit d1f8f825c3
8 changed files with 116 additions and 18 deletions

View File

@@ -110,6 +110,7 @@ CREATE TABLE timer_function_invocations (
invocation_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
logs JSONB,
version_number INT NOT NULL,
execution_time FLOAT,
CONSTRAINT fk_timer_function_invocations
FOREIGN KEY (timer_function_id)
@@ -402,9 +403,9 @@ def logs(function_id):
# Fetch the invocation logs
timer_function_invocations = db.execute("""
SELECT id, timer_function_id, status, invocation_time,
logs, version_number
FROM timer_function_invocations
SELECT id, timer_function_id, status, invocation_time,
logs, version_number, execution_time
FROM timer_function_invocations
WHERE timer_function_id = %s
ORDER BY invocation_time DESC
LIMIT 100