diff --git a/lib/pinchflat_web/controllers/settings/diagnostics_html/show.html.heex b/lib/pinchflat_web/controllers/settings/diagnostics_html/show.html.heex index 1c64a22..a8c0195 100644 --- a/lib/pinchflat_web/controllers/settings/diagnostics_html/show.html.heex +++ b/lib/pinchflat_web/controllers/settings/diagnostics_html/show.html.heex @@ -13,19 +13,19 @@

Pending Downloads

-

<%= stats.total_pending_downloads %>

+

{stats.total_pending_downloads}

Downloaded Media

-

<%= stats.total_downloaded %>

+

{stats.total_downloaded}

Total Sources

-

<%= stats.total_sources %>

+

{stats.total_sources}

Database Size

-

<%= stats.database_size %>

+

{stats.database_size}

@@ -44,27 +44,29 @@ <%= for stats <- queue_stats() do %>
-

<%= format_queue_name(stats.name) %>

+

{format_queue_name(stats.name)}

- <%= queue_status_text(stats) %> + {queue_status_text(stats)}
Running: - <%= stats.running %>/<%= stats.limit %> + {stats.running}/{stats.limit}
Available: - <%= stats.available %> + {stats.available}
Scheduled: - <%= stats.scheduled %> + {stats.scheduled}
0, do: "text-red-400", else: "text-bodydark"}"}>Retryable: - 0, do: "text-red-400 font-bold", else: "text-white"}"}><%= stats.retryable %> + 0, do: "text-red-400 font-bold", else: "text-white"}"}> + {stats.retryable} +
@@ -78,10 +80,13 @@

- <.icon name="hero-exclamation-triangle" class="h-5 w-5 text-yellow-500 mr-2" /> - Stuck Jobs (<%= length(stuck) %>) + <.icon name="hero-exclamation-triangle" class="h-5 w-5 text-yellow-500 mr-2" /> Stuck Jobs ({length(stuck)})

- <.link href={~p"/diagnostics/reset_stuck_jobs"} method="post" data-confirm="This will reset all stuck jobs. They will be retried. Continue?"> + <.link + href={~p"/diagnostics/reset_stuck_jobs"} + method="post" + data-confirm="This will reset all stuck jobs. They will be retried. Continue?" + > <.button color="bg-yellow-600" rounding="rounded-lg" class="text-sm"> <.icon name="hero-arrow-path" class="h-4 w-4 mr-1" /> Reset All Stuck Jobs @@ -104,15 +109,24 @@ <%= for job <- stuck do %> - #<%= job.id %> - <%= job.queue %> - <%= format_worker_name(job.worker) %> - <%= format_datetime(job.attempted_at) %> + #{job.id} + {job.queue} + {format_worker_name(job.worker)} + {format_datetime(job.attempted_at)} - <.link href={~p"/diagnostics/reset_job/#{job.id}"} method="post" class="text-primary hover:underline mr-3"> + <.link + href={~p"/diagnostics/reset_job/#{job.id}"} + method="post" + class="text-primary hover:underline mr-3" + > Reset - <.link href={~p"/diagnostics/cancel_job/#{job.id}"} method="post" class="text-red-400 hover:underline" data-confirm="Cancel this job?"> + <.link + href={~p"/diagnostics/cancel_job/#{job.id}"} + method="post" + class="text-red-400 hover:underline" + data-confirm="Cancel this job?" + > Cancel @@ -129,11 +143,14 @@

- <.icon name="hero-exclamation-circle" class="h-5 w-5 text-red-500 mr-2" /> - Failed Jobs (<%= length(retryable) %>) + <.icon name="hero-exclamation-circle" class="h-5 w-5 text-red-500 mr-2" /> Failed Jobs ({length(retryable)})

<%= if length(retryable) > 0 do %> - <.link href={~p"/diagnostics/reset_retryable_jobs"} method="post" data-confirm="This will reset all failed jobs and clear their error history. They will be retried from scratch. Continue?"> + <.link + href={~p"/diagnostics/reset_retryable_jobs"} + method="post" + data-confirm="This will reset all failed jobs and clear their error history. They will be retried from scratch. Continue?" + > <.button color="bg-red-600" rounding="rounded-lg" class="text-sm"> <.icon name="hero-arrow-path" class="h-4 w-4 mr-1" /> Reset All Failed Jobs @@ -162,18 +179,27 @@ <%= for job <- retryable do %> - #<%= job.id %> - <%= job.queue %> - <%= format_worker_name(job.worker) %> - <%= job.attempt %>/<%= job.max_attempts %> + #{job.id} + {job.queue} + {format_worker_name(job.worker)} + {job.attempt}/{job.max_attempts} - <%= extract_last_error(job.errors) %> + {extract_last_error(job.errors)} - <.link href={~p"/diagnostics/reset_job/#{job.id}"} method="post" class="text-primary hover:underline mr-3"> + <.link + href={~p"/diagnostics/reset_job/#{job.id}"} + method="post" + class="text-primary hover:underline mr-3" + > Reset - <.link href={~p"/diagnostics/cancel_job/#{job.id}"} method="post" class="text-red-400 hover:underline" data-confirm="Cancel this job?"> + <.link + href={~p"/diagnostics/cancel_job/#{job.id}"} + method="post" + class="text-red-400 hover:underline" + data-confirm="Cancel this job?" + > Cancel