diff --git a/webapp/src/app/modules/jobs/job-logs-dialog/job-logs-dialog.component.ts b/webapp/src/app/modules/jobs/job-logs-dialog/job-logs-dialog.component.ts index 7965cb9e..3828598b 100644 --- a/webapp/src/app/modules/jobs/job-logs-dialog/job-logs-dialog.component.ts +++ b/webapp/src/app/modules/jobs/job-logs-dialog/job-logs-dialog.component.ts @@ -76,9 +76,6 @@ export class JobLogsDialogComponent implements OnInit { private readonly logsPanel = viewChild>('logsPanel'); - // Follow the tail (auto-scroll to the newest lines) as long as the user is at - // the bottom. Once they scroll up to read, this turns false and their scroll - // position is left untouched on the next refresh. private followTail = true; private readonly followThresholdPx = 24; @@ -87,7 +84,6 @@ export class JobLogsDialogComponent implements OnInit { timer(5000, 5000) .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => this.loadRuns()); - // Ticks the live "läuft seit …" duration every second. timer(1000, 1000) .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => this.nowMs.set(Date.now())); @@ -133,7 +129,6 @@ export class JobLogsDialogComponent implements OnInit { protected onRunSelected(runId: number): void { const run = this.runs().find((item) => item.id === runId); if (run) { - // A run the user just picked should open at its newest output. this.followTail = true; this.selectRun(run); } @@ -148,7 +143,6 @@ export class JobLogsDialogComponent implements OnInit { } private scrollToBottom(): void { - // Defer until the new log content has been rendered. setTimeout(() => { const panel = this.logsPanel()?.nativeElement; if (panel) panel.scrollTop = panel.scrollHeight; diff --git a/webapp/src/app/modules/jobs/jobs.component.scss b/webapp/src/app/modules/jobs/jobs.component.scss index a3aceb88..b131ba42 100644 --- a/webapp/src/app/modules/jobs/jobs.component.scss +++ b/webapp/src/app/modules/jobs/jobs.component.scss @@ -236,6 +236,7 @@ mat-paginator { align-items: center; gap: 2px; font-size: 13px; + white-space: nowrap; } .last-run-message { diff --git a/webapp/src/app/modules/jobs/jobs.component.ts b/webapp/src/app/modules/jobs/jobs.component.ts index 526c90ee..5b6b4153 100644 --- a/webapp/src/app/modules/jobs/jobs.component.ts +++ b/webapp/src/app/modules/jobs/jobs.component.ts @@ -128,7 +128,6 @@ export class JobsComponent implements OnInit { ) .subscribe((tasks) => this.setTasksPreservingPendingStops(tasks)); - // Ticks the live "läuft seit …" duration in the last-run column. timer(1000, 1000) .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe(() => this.nowMs.set(Date.now())); diff --git a/webapp/src/app/modules/jobs/jobs.utils.ts b/webapp/src/app/modules/jobs/jobs.utils.ts index 8936ca77..b7151c90 100644 --- a/webapp/src/app/modules/jobs/jobs.utils.ts +++ b/webapp/src/app/modules/jobs/jobs.utils.ts @@ -39,8 +39,6 @@ export function formatScheduleCron(schedule: string | null): string { return schedule ? `Cron: ${schedule}` : 'Nur manuell'; } -// Backend timestamps are naive UTC without a timezone suffix, so add a "Z" -// before parsing to keep them comparable with the (UTC-based) wall clock. function appendUtcZ(value: string): string { return /(?:Z|[+-]\d{2}:\d{2})$/.test(value) ? value : `${value}Z`; } @@ -61,7 +59,6 @@ export function formatUtcDateAsLocal(value: string | null | undefined): string { }).format(new Date(appendUtcZ(value))); } -// Compact clock format: "00:05 min", "02:28 min", and "1:01:30 h" past an hour. export function formatDurationSeconds(totalSeconds: number): string { const s = Math.max(0, Math.round(totalSeconds)); const pad = (n: number) => n.toString().padStart(2, '0'); @@ -74,7 +71,6 @@ export function formatDurationSeconds(totalSeconds: number): string { return `${pad(minutes)}:${pad(seconds)} min`; } -// Duration of a finished run, or null while it is still running. export function formatRunDuration(run: JobRun): string | null { if (!run.started_at || !run.finished_at) return null; return formatDurationSeconds( @@ -82,7 +78,6 @@ export function formatRunDuration(run: JobRun): string | null { ); } -// Live elapsed time since the run started, relative to the given "now" (ms). export function formatRunElapsed(run: JobRun, nowMs: number): string | null { if (!run.started_at) return null; return formatDurationSeconds((nowMs - toUtcMs(run.started_at)) / 1000); diff --git a/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.scss b/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.scss index 2223c6ed..e4d82bc2 100644 --- a/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.scss +++ b/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.scss @@ -4,13 +4,9 @@ gap: 12px; min-width: 400px; - // Give the first field's floating label room so it is not clipped by the - // dialog title above it. padding-top: 6px; } -// Long commands / image names should wrap and stay fully readable, and the -// user can drag the field taller. .command-input, .image-input { resize: vertical; diff --git a/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.ts b/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.ts index 4cf49752..50858c76 100644 --- a/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.ts +++ b/webapp/src/app/modules/jobs/task-create-dialog/task-create-dialog.component.ts @@ -70,8 +70,6 @@ export class TaskCreateDialogComponent { const env = this.parseEnv(value.env); if (env === undefined) return; - // The default image is stored as null so jobs keep following the - // backend-configured image if it ever changes. const image = value.image.trim(); this.creating.set(true); diff --git a/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.scss b/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.scss index 867d6b94..6f18c2d5 100644 --- a/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.scss +++ b/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.scss @@ -4,13 +4,9 @@ gap: 12px; min-width: 400px; - // Give the first field's floating label room so it is not clipped by the - // dialog title above it. padding-top: 6px; } -// Long commands / image names should wrap and stay fully readable, and the -// user can drag the field taller. .command-input, .image-input { resize: vertical; diff --git a/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.ts b/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.ts index 7856e4d2..776749a9 100644 --- a/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.ts +++ b/webapp/src/app/modules/jobs/task-edit-dialog/task-edit-dialog.component.ts @@ -86,8 +86,6 @@ export class TaskEditDialogComponent { const env = this.parseEnv(value.env); if (env === undefined) return; - // The default image is stored as null so the job keeps following the - // backend-configured image if it ever changes. const image = value.image.trim(); this.saving.set(true);