Added error information to homepage tables
This commit is contained in:
parent
ecd9d0e96f
commit
9dca081fbc
2 changed files with 25 additions and 13 deletions
|
|
@ -24,7 +24,15 @@
|
||||||
</:tab_append>
|
</:tab_append>
|
||||||
|
|
||||||
<:tab title="Media" id="media">
|
<:tab title="Media" id="media">
|
||||||
<div class="flex flex-col gap-10 dark:text-white">
|
<div class="flex flex-col gap-10 text-white">
|
||||||
|
<section :if={@media_item.last_error} class="mt-6">
|
||||||
|
<div class="flex items-center gap-1 mb-2">
|
||||||
|
<.icon name="hero-exclamation-circle-solid" class="text-red-500" />
|
||||||
|
<h3 class="font-bold text-xl">Last Error</h3>
|
||||||
|
</div>
|
||||||
|
<span>{@media_item.last_error}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
<%= if media_file_exists?(@media_item) do %>
|
<%= if media_file_exists?(@media_item) do %>
|
||||||
<section class="grid grid-cols-1 xl:gap-6 mt-6">
|
<section class="grid grid-cols-1 xl:gap-6 mt-6">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -54,14 +62,6 @@
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<section :if={@media_item.last_error} class="mt-6">
|
|
||||||
<div class="flex items-center gap-1 mb-2">
|
|
||||||
<.icon name="hero-exclamation-circle-solid" class="text-red-500" />
|
|
||||||
<h3 class="font-bold text-xl">Last Error</h3>
|
|
||||||
</div>
|
|
||||||
<span>{@media_item.last_error}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h3 class="font-bold text-xl mb-2">Raw Attributes</h3>
|
<h3 class="font-bold text-xl mb-2">Raw Attributes</h3>
|
||||||
<section>
|
<section>
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,22 @@ defmodule Pinchflat.Pages.HistoryTableLive do
|
||||||
</span>
|
</span>
|
||||||
<div class="max-w-full overflow-x-auto">
|
<div class="max-w-full overflow-x-auto">
|
||||||
<.table rows={@records} table_class="text-white">
|
<.table rows={@records} table_class="text-white">
|
||||||
<:col :let={media_item} label="Title" class="truncate max-w-xs">
|
<:col :let={media_item} label="Title" class="max-w-xs">
|
||||||
<.subtle_link href={~p"/sources/#{media_item.source_id}/media/#{media_item}"}>
|
<section class="flex items-center space-x-1">
|
||||||
{media_item.title}
|
<.tooltip
|
||||||
</.subtle_link>
|
:if={media_item.last_error}
|
||||||
|
tooltip={media_item.last_error}
|
||||||
|
position="bottom-right"
|
||||||
|
tooltip_class="w-64"
|
||||||
|
>
|
||||||
|
<.icon name="hero-exclamation-circle-solid" class="text-red-500" />
|
||||||
|
</.tooltip>
|
||||||
|
<span class="truncate">
|
||||||
|
<.subtle_link href={~p"/sources/#{media_item.source_id}/media/#{media_item.id}"}>
|
||||||
|
{media_item.title}
|
||||||
|
</.subtle_link>
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={media_item} label="Upload Date">
|
<:col :let={media_item} label="Upload Date">
|
||||||
{DateTime.to_date(media_item.uploaded_at)}
|
{DateTime.to_date(media_item.uploaded_at)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue