Skip to content

Commit 38e2907

Browse files
ui build updates
1 parent 2fdaffe commit 38e2907

File tree

8 files changed

+132
-135
lines changed

8 files changed

+132
-135
lines changed

CHANGELOG.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33

44
#### Enhancements
55

6-
- Added a `pio jobs` command group with `status`, `history`, `info`, and `remove` subcommands to inspect and tidy job records, including published settings.
7-
- Background job logs now include the job_id in their logger key and duplicate-start warnings report the running job_id for easier debugging.
8-
6+
- Added a `pio jobs` command group with `status`, `list`, `info`, and `remove` subcommands to inspect and tidy job records, including published settings.
97
#### Breaking changes
108

119
- `pio job-status` has been replaced by `pio jobs status`.
1210

1311
#### Bug fixes
1412

15-
- fix OD blank not being able to be run.
16-
- OD calibration now clamps out-of-range voltages to the OD values paired with the calibration’s voltage extrema, preventing inverted mappings on non-monotonic curves.
17-
- Images ship with DAC43608 library (missed the previous OS jump!)
18-
- Improvements to "Updating your model" on first boot.
19-
13+
- fix OD blank not being able to be run.
14+
- OD calibration now clamps out-of-range voltages to the OD values paired with the calibration’s voltage extrema, preventing inverted mappings on non-monotonic curves.
15+
- Images ship with DAC43608 library (missed the previous OS jump!)
16+
- Improvements to "Updating your model" on first boot.
17+
- Fix /pioreactor page crashing if a worker is inactive in the experiment.
2018

2119
### 25.11.19
2220

core/pioreactor/cli/pio.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def _format_job_history_line(
343343
ended_at: str | None,
344344
) -> str:
345345
job_source_display = job_source or "unknown"
346-
ended_at_display = ended_at or "still running"
346+
ended_at_display = _format_timestamp_to_seconds(ended_at) or "still running"
347347
job_id_label = click.style(f"[job_id={job_id}]", fg="cyan")
348348
job_name_label = click.style(job_name, fg="green", bold=True)
349349
ended_at_label = (
@@ -352,8 +352,8 @@ def _format_job_history_line(
352352

353353
return (
354354
f"{job_id_label} {job_name_label} "
355-
f"(unit={unit}, experiment={experiment}, source={job_source_display}) "
356-
f"started_at={started_at} ended_at={ended_at_label}"
355+
f"experiment={experiment}, source={job_source_display}, "
356+
f"started_at={_format_timestamp_to_seconds(started_at)}, ended_at={ended_at_label}"
357357
)
358358

359359

@@ -371,35 +371,36 @@ def job_running() -> None:
371371
click.echo(f"{job_id_label} {job_name_label} is running.")
372372

373373

374-
@jobs.command(name="history", short_help="list historical jobs with timing")
374+
@jobs.command(name="list", short_help="list jobs current and previous")
375375
def job_history() -> None:
376376
with JobManager() as jm:
377377
jobs = jm.list_job_history()
378378

379379
if not jobs:
380-
click.echo("No historical jobs recorded.")
380+
click.echo("No jobs recorded.")
381381
return
382382

383383
for job in jobs:
384384
click.echo(_format_job_history_line(*job))
385385

386386

387+
def _format_timestamp_to_seconds(timestamp: str) -> str:
388+
"""
389+
Truncate timestamps like 2024-01-01T00:00:00.123456Z to second precision.
390+
"""
391+
try:
392+
dt = to_datetime(timestamp)
393+
except ValueError:
394+
return timestamp
395+
396+
return dt.replace(microsecond=0).strftime("%Y-%m-%dT%H:%M:%S")
397+
398+
387399
@jobs.command(name="info", short_help="show details for a job")
388400
@click.option("--job-id", type=click.INT)
389401
@click.option("--job-name", type=click.STRING)
390402
def job_info(job_id: int | None, job_name: str | None) -> None:
391403

392-
def _format_timestamp_to_seconds(timestamp: str) -> str:
393-
"""
394-
Truncate timestamps like 2024-01-01T00:00:00.123456Z to second precision.
395-
"""
396-
try:
397-
dt = to_datetime(timestamp)
398-
except ValueError:
399-
return timestamp
400-
401-
return dt.replace(microsecond=0).isoformat().replace("+00:00", "Z")
402-
403404
if job_id is None and job_name is None:
404405
click.echo("Provide --job-id or --job-name.")
405406
return
@@ -441,9 +442,7 @@ def _format_timestamp_to_seconds(timestamp: str) -> str:
441442
status_label = (
442443
click.style("running", fg="green", bold=True) if is_running else click.style("stopped", fg="red")
443444
)
444-
click.echo(
445-
f"status={status_label} leader={leader} pid={pid} " f"is_long_running_job={bool(is_long_running_job)}"
446-
)
445+
click.echo(f"status={status_label}")
447446

448447
if not settings:
449448
return

core/pioreactor/web/static/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/static/css/main.9c7a48b7.css",
4-
"main.js": "/static/static/js/main.64fd3d0d.js",
4+
"main.js": "/static/static/js/main.00e6ec24.js",
55
"static/media/pioreactor_cloud.webp": "/static/static/media/pioreactor_cloud.b15b29e435797dc69d76.webp",
66
"static/media/roboto-all-500-normal.woff": "/static/static/media/roboto-all-500-normal.0ab669b7a0d19b178f57.woff",
77
"static/media/roboto-all-700-normal.woff": "/static/static/media/roboto-all-700-normal.a457fde362a540fcadff.woff",
@@ -30,10 +30,10 @@
3030
"static/media/roboto-greek-ext-700-normal.woff2": "/static/static/media/roboto-greek-ext-700-normal.bd9854c751441ccc1a70.woff2",
3131
"index.html": "/static/index.html",
3232
"main.9c7a48b7.css.map": "/static/static/css/main.9c7a48b7.css.map",
33-
"main.64fd3d0d.js.map": "/static/static/js/main.64fd3d0d.js.map"
33+
"main.00e6ec24.js.map": "/static/static/js/main.00e6ec24.js.map"
3434
},
3535
"entrypoints": [
3636
"static/css/main.9c7a48b7.css",
37-
"static/js/main.64fd3d0d.js"
37+
"static/js/main.00e6ec24.js"
3838
]
3939
}
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="/static/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="/static/logo192.png"/><link rel="manifest" href="/static/manifest.json"/><script defer="defer" src="/static/static/js/main.64fd3d0d.js"></script><link href="/static/static/css/main.9c7a48b7.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="/static/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="/static/logo192.png"/><link rel="manifest" href="/static/manifest.json"/><script defer="defer" src="/static/static/js/main.00e6ec24.js"></script><link href="/static/static/css/main.9c7a48b7.css" rel="stylesheet"></head><body><div id="root"></div></body></html>

core/pioreactor/web/static/static/js/main.00e6ec24.js

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/pioreactor/web/static/static/js/main.64fd3d0d.js.LICENSE.txt renamed to core/pioreactor/web/static/static/js/main.00e6ec24.js.LICENSE.txt

File renamed without changes.

core/pioreactor/web/static/static/js/main.64fd3d0d.js.map renamed to core/pioreactor/web/static/static/js/main.00e6ec24.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/pioreactor/web/static/static/js/main.64fd3d0d.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)