- {title.toUpperCase()}
+
+
+
+
+
{title.toUpperCase()}
+
+ {#if jobCounts.failed > 0}
+
+ {jobCounts.failed.toLocaleString($locale)} failed
+
+ {/if}
+
- {#if subtitle.length > 0}
-
{subtitle}
+ {#if subtitle}
+
{subtitle}
{/if}
-
+
+
+
-
+
Active
- {#if jobCounts.active !== undefined}
- {jobCounts.active.toLocaleString($locale)}
- {:else}
-
- {/if}
+ {jobCounts.active.toLocaleString($locale)}
@@ -54,49 +62,50 @@
class="flex place-items-center justify-between bg-gray-200 text-immich-dark-bg dark:bg-gray-700 dark:text-immich-gray w-full rounded-tr-lg rounded-br-lg py-4 pr-4 pl-6"
>
- {#if jobCounts.waiting !== undefined}
- {jobCounts.waiting.toLocaleString($locale)}
- {:else}
-
- {/if}
+ {waitingCount.toLocaleString($locale)}
Waiting
-
+
{#if isRunning}
+ {:else if jobCounts.paused > 0}
+
+ {:else if allowForceCommand}
+
+
+ {:else}
+
- {/if}
-
- {#if !isRunning}
- {#if showOptions}
-
-
- {:else}
-
- {/if}
{/if}
diff --git a/web/src/lib/components/admin-page/jobs/jobs-panel.svelte b/web/src/lib/components/admin-page/jobs/jobs-panel.svelte
index 3a66855078..267210b005 100644
--- a/web/src/lib/components/admin-page/jobs/jobs-panel.svelte
+++ b/web/src/lib/components/admin-page/jobs/jobs-panel.svelte
@@ -1,115 +1,87 @@
- {#if jobs}
+ {#each jobDetailsArray as [jobName, { title, subtitle, allowForceCommand, component }]}
start(JobName.ThumbnailGenerationQueue, e.detail.force)}
- jobCounts={jobs[JobName.ThumbnailGenerationQueue]}
- />
-
- start(JobName.MetadataExtractionQueue, e.detail.force)}
- jobCounts={jobs[JobName.MetadataExtractionQueue]}
- />
-
- start(JobName.ObjectTaggingQueue, e.detail.force)}
- jobCounts={jobs[JobName.ObjectTaggingQueue]}
+ {title}
+ {subtitle}
+ {allowForceCommand}
+ on:command={({ detail }) => runJob(jobName, detail)}
+ jobCounts={jobs[jobName]}
>
- Note that some assets may not have any objects detected
+
-
- start(JobName.ClipEncodingQueue, e.detail.force)}
- jobCounts={jobs[JobName.ClipEncodingQueue]}
- />
-
- start(JobName.VideoConversionQueue, e.detail.force)}
- jobCounts={jobs[JobName.VideoConversionQueue]}
- />
-
- start(JobName.StorageTemplateMigrationQueue, e.detail.force)}
- jobCounts={jobs[JobName.StorageTemplateMigrationQueue]}
- >
- Apply the current
- Storage template
- to previously uploaded assets
-
- {/if}
+ {/each}
diff --git a/web/src/lib/components/admin-page/jobs/storage-migration-description.svelte b/web/src/lib/components/admin-page/jobs/storage-migration-description.svelte
new file mode 100644
index 0000000000..d5cae7ccf3
--- /dev/null
+++ b/web/src/lib/components/admin-page/jobs/storage-migration-description.svelte
@@ -0,0 +1,10 @@
+
+
+Apply the current
+
Storage template
+to previously uploaded assets
diff --git a/web/src/lib/components/elements/badge.svelte b/web/src/lib/components/elements/badge.svelte
new file mode 100644
index 0000000000..032f7750db
--- /dev/null
+++ b/web/src/lib/components/elements/badge.svelte
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
diff --git a/web/src/routes/admin/jobs-status/+page.server.ts b/web/src/routes/admin/jobs-status/+page.server.ts
index 5c5aee28ce..f20e0010e2 100644
--- a/web/src/routes/admin/jobs-status/+page.server.ts
+++ b/web/src/routes/admin/jobs-status/+page.server.ts
@@ -1,18 +1,25 @@
+import { AppRoute } from '$lib/constants';
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
-export const load: PageServerLoad = async ({ parent }) => {
- const { user } = await parent();
-
+export const load = (async ({ locals: { user, api } }) => {
if (!user) {
- throw redirect(302, '/auth/login');
+ throw redirect(302, AppRoute.AUTH_LOGIN);
} else if (!user.isAdmin) {
- throw redirect(302, '/photos');
+ throw redirect(302, AppRoute.PHOTOS);
}
- return {
- meta: {
- title: 'Job Status'
- }
- };
-};
+ try {
+ const { data: jobs } = await api.jobApi.getAllJobsStatus();
+
+ return {
+ jobs,
+ meta: {
+ title: 'Job Status'
+ }
+ };
+ } catch (err) {
+ console.error('[jobs] > getAllJobsStatus', err);
+ throw err;
+ }
+}) satisfies PageServerLoad;
diff --git a/web/src/routes/admin/jobs-status/+page.svelte b/web/src/routes/admin/jobs-status/+page.svelte
index a6a75f0734..263db4df48 100644
--- a/web/src/routes/admin/jobs-status/+page.svelte
+++ b/web/src/routes/admin/jobs-status/+page.svelte
@@ -1,7 +1,26 @@
-
-
+