205 lines
5.8 KiB
HTML
205 lines
5.8 KiB
HTML
<section class="preprocessing-page">
|
|
<header class="page-header">
|
|
<div>
|
|
<h1>Jobs</h1>
|
|
<p>
|
|
Tasks zur Aufbereitung und Indizierung der Daten manuell ausführen oder
|
|
automatisch planen.
|
|
</p>
|
|
</div>
|
|
</header>
|
|
|
|
<mat-card appearance="outlined" class="container-card">
|
|
<mat-card-content class="container-card-content">
|
|
<div class="container-info">
|
|
<span
|
|
class="container-state-dot"
|
|
[class.container-state-dot--running]="
|
|
containerStatus().state === 'running'
|
|
"
|
|
[class.container-state-dot--stopped]="
|
|
containerStatus().state === 'stopped'
|
|
"
|
|
[class.container-state-dot--restarting]="
|
|
containerStatus().state === 'restarting'
|
|
">
|
|
</span>
|
|
<div>
|
|
<strong>{{ containerStatus().name }}</strong>
|
|
<div class="container-meta">
|
|
<span>{{ containerStatus().image }}</span>
|
|
<span class="container-digest">{{
|
|
containerStatus().imageDigest
|
|
}}</span>
|
|
@switch (containerStatus().state) {
|
|
@case ('running') {
|
|
<span
|
|
>Läuft{{
|
|
containerStatus().uptime
|
|
? ' · seit ' + containerStatus().uptime
|
|
: ''
|
|
}}</span
|
|
>
|
|
}
|
|
@case ('stopped') {
|
|
<span>Gestoppt</span>
|
|
}
|
|
@case ('restarting') {
|
|
<span>Wird neu gestartet …</span>
|
|
}
|
|
}
|
|
@if (containerStatus().updateAvailable) {
|
|
<span class="update-badge">
|
|
<mat-icon>upgrade</mat-icon>
|
|
Neue Version verfügbar
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container-actions">
|
|
@if (containerStatus().updateAvailable) {
|
|
<button
|
|
mat-flat-button
|
|
color="primary"
|
|
type="button"
|
|
[disabled]="containerBusy()"
|
|
(click)="updateImage()">
|
|
<mat-icon>upgrade</mat-icon>
|
|
Image aktualisieren
|
|
</button>
|
|
}
|
|
@if (containerStatus().state === 'running') {
|
|
<button
|
|
mat-stroked-button
|
|
type="button"
|
|
[disabled]="containerBusy()"
|
|
(click)="restartContainer()">
|
|
<mat-icon>restart_alt</mat-icon>
|
|
Neu starten
|
|
</button>
|
|
<button
|
|
mat-stroked-button
|
|
color="warn"
|
|
type="button"
|
|
[disabled]="containerBusy()"
|
|
(click)="stopContainer()">
|
|
<mat-icon>stop</mat-icon>
|
|
Stoppen
|
|
</button>
|
|
} @else {
|
|
<button
|
|
mat-flat-button
|
|
color="primary"
|
|
type="button"
|
|
[disabled]="containerBusy()"
|
|
(click)="startContainer()">
|
|
<mat-icon>play_arrow</mat-icon>
|
|
Starten
|
|
</button>
|
|
}
|
|
</div>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
|
|
<mat-card appearance="outlined">
|
|
<mat-card-content>
|
|
<app-data-table [columns]="taskColumns" [data]="tasks()" />
|
|
</mat-card-content>
|
|
</mat-card>
|
|
</section>
|
|
|
|
<ng-template #taskNameTmp let-row>
|
|
<div class="task-name-cell">
|
|
<strong>{{ row.name }}</strong>
|
|
<span class="task-description">{{ row.description }}</span>
|
|
<code class="task-index">{{ row.targetIndex }}</code>
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #taskScheduleTmp let-row>
|
|
<div class="task-schedule-cell">
|
|
<span>{{ formatSchedule(row.schedule) }}</span>
|
|
<button
|
|
type="button"
|
|
role="switch"
|
|
class="schedule-toggle"
|
|
[class.schedule-toggle--on]="row.enabled"
|
|
[attr.aria-checked]="row.enabled"
|
|
[attr.aria-label]="row.name + ': automatische Ausführung'"
|
|
(click)="toggleEnabled(row, !row.enabled)">
|
|
<span class="schedule-toggle__track">
|
|
<span class="schedule-toggle__thumb"></span>
|
|
</span>
|
|
<span class="schedule-toggle__label">{{
|
|
row.enabled ? 'Aktiv' : 'Inaktiv'
|
|
}}</span>
|
|
</button>
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #taskStatusTmp let-row>
|
|
@switch (row.status) {
|
|
@case ('running') {
|
|
<span class="task-status task-status--running">
|
|
<mat-progress-spinner
|
|
diameter="14"
|
|
mode="indeterminate"></mat-progress-spinner>
|
|
Läuft
|
|
</span>
|
|
}
|
|
@case ('success') {
|
|
<span class="task-status task-status--success">
|
|
<mat-icon>check_circle</mat-icon>
|
|
Erfolgreich
|
|
</span>
|
|
}
|
|
@case ('failed') {
|
|
<span class="task-status task-status--failed">
|
|
<mat-icon>error</mat-icon>
|
|
Fehlgeschlagen
|
|
</span>
|
|
}
|
|
@default {
|
|
<span class="task-status task-status--idle">
|
|
<mat-icon>schedule</mat-icon>
|
|
Bereit
|
|
</span>
|
|
}
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #taskLastRunTmp let-row>
|
|
@if (row.lastRun) {
|
|
<div class="last-run-cell">
|
|
<span>{{ row.lastRun.startedAt | date: 'dd.MM.yyyy HH:mm' }}</span>
|
|
<span class="last-run-message">{{ row.lastRun.message }}</span>
|
|
</div>
|
|
} @else {
|
|
<span class="last-run-empty">Noch nicht ausgeführt</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #taskActionsTmp let-row>
|
|
<div class="row-actions">
|
|
<button
|
|
mat-icon-button
|
|
type="button"
|
|
aria-label="Jetzt ausführen"
|
|
matTooltip="Jetzt ausführen"
|
|
[disabled]="row.status === 'running'"
|
|
(click)="runNow(row)">
|
|
<mat-icon>play_arrow</mat-icon>
|
|
</button>
|
|
<button
|
|
mat-icon-button
|
|
type="button"
|
|
aria-label="Zeitplan bearbeiten"
|
|
matTooltip="Zeitplan bearbeiten"
|
|
(click)="openScheduleDialog(row)">
|
|
<mat-icon>edit_calendar</mat-icon>
|
|
</button>
|
|
</div>
|
|
</ng-template>
|