uploads: add column for error messages.

Change it so uploads store errors in an `error` column instead of in the
`status` field.
This commit is contained in:
evazion
2022-02-07 14:41:48 -06:00
parent 19a9cf3d2f
commit 1a61e329ba
9 changed files with 45 additions and 21 deletions

View File

@@ -59,7 +59,7 @@
<div>
<strong>Error</strong>
<span>
<%= upload.status.delete_prefix("error: ") %>
<%= upload.error %>
</span>
</div>
<% end %>
@@ -72,11 +72,7 @@
<% end %>
<% t.column :status do |upload| %>
<% if upload.is_errored? %>
error
<% elsif !upload.is_completed? %>
<%= upload.status %>
<% end %>
<%= upload.status %>
<% end %>
<% end %>

View File

@@ -9,7 +9,7 @@
<% end %>
<% if @upload.is_errored? %>
<p><%= @upload.status %></p>
<p>Error: <%= @upload.error %>.</p>
<% elsif @upload.is_pending? && @upload.source.present? %>
<p>Preparing to upload <%= external_link_to @upload.source %>...</p>
<% elsif @upload.is_processing? && @upload.source.present? %>