Skip to content

Commit 33cebe5

Browse files
log page improvements
1 parent 58056f5 commit 33cebe5

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.a3dbeddd.css",
4-
"main.js": "/static/js/main.605e9ff6.js",
4+
"main.js": "/static/js/main.d1253fc9.js",
55
"static/media/roboto-all-500-normal.woff": "/static/media/roboto-all-500-normal.0ab669b7a0d19b178f57.woff",
66
"static/media/roboto-all-700-normal.woff": "/static/media/roboto-all-700-normal.a457fde362a540fcadff.woff",
77
"static/media/roboto-all-400-normal.woff": "/static/media/roboto-all-400-normal.c5d001fa922fa66a147f.woff",
@@ -36,10 +36,10 @@
3636
"static/media/roboto-greek-ext-700-normal.woff2": "/static/media/roboto-greek-ext-700-normal.bd9854c751441ccc1a70.woff2",
3737
"index.html": "/index.html",
3838
"main.a3dbeddd.css.map": "/static/css/main.a3dbeddd.css.map",
39-
"main.605e9ff6.js.map": "/static/js/main.605e9ff6.js.map"
39+
"main.d1253fc9.js.map": "/static/js/main.d1253fc9.js.map"
4040
},
4141
"entrypoints": [
4242
"static/css/main.a3dbeddd.css",
43-
"static/js/main.605e9ff6.js"
43+
"static/js/main.d1253fc9.js"
4444
]
4545
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.605e9ff6.js"></script><link href="/static/css/main.a3dbeddd.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.d1253fc9.js"></script><link href="/static/css/main.a3dbeddd.css" rel="stylesheet"></head><body><div id="root"></div></body></html>

pioreactorui/api.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ def get_logs(experiment: str) -> ResponseReturnValue:
377377
recent_logs = query_app_db(
378378
f"""SELECT l.timestamp, level, l.pioreactor_unit, message, task
379379
FROM logs AS l
380+
JOIN experiment_worker_assignments_history h
381+
on h.pioreactor_unit = l.pioreactor_unit
382+
and h.experiment = l.experiment
383+
and h.assigned_at <= l.timestamp
384+
and l.timestamp <= coalesce(h.unassigned_at, strftime('%Y-%m-%dT%H:%M:%S', datetime('now')) )
380385
WHERE (l.experiment=?)
381386
AND ({get_level_string("DEBUG")})
382387
ORDER BY l.timestamp DESC LIMIT 50 OFFSET {skip};""",
@@ -444,6 +449,11 @@ def get_logs_for_unit_and_experiment(pioreactor_unit: str, experiment: str) -> R
444449
recent_logs = query_app_db(
445450
f"""SELECT l.timestamp, level, l.pioreactor_unit, message, task
446451
FROM logs AS l
452+
JOIN experiment_worker_assignments_history h
453+
on h.pioreactor_unit = l.pioreactor_unit
454+
and h.experiment = l.experiment
455+
and h.assigned_at <= l.timestamp
456+
and l.timestamp <= coalesce(h.unassigned_at, strftime('%Y-%m-%dT%H:%M:%S', datetime('now')) )
447457
WHERE (l.experiment=?)
448458
AND (l.pioreactor_unit=? or l.pioreactor_unit=?)
449459
AND ({get_level_string("DEBUG")})
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)