-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24ced1e
commit 049931c
Showing
18 changed files
with
385 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 59 additions & 54 deletions
113
lib/exq_ui_web/live/components/job_details_component.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,64 @@ | ||
<div class="row"> | ||
<%= if @item do %> | ||
<div class="col-4 my-2"> | ||
<%= for %{name: name, label: label} <- @actions do %> | ||
<%= link label, class: "btn btn-danger btn-sm me-1", to: "#", phx_click: name, phx_value_raw: @item.raw %> | ||
<% end %> | ||
</div> | ||
<div class="col-12"> | ||
<table class="my-2 table table-bordered"> | ||
<tbody> | ||
<tr> | ||
<th>Queue</th> | ||
<td><%= @item.job.queue %></td> | ||
</tr> | ||
<tr> | ||
<th>Module</th> | ||
<td><%= @item.job.class %></td> | ||
</tr> | ||
<tr> | ||
<th>JID</th> | ||
<td><%= @item.job.jid %></td> | ||
</tr> | ||
<tr> | ||
<th>Arguments</th> | ||
<td><%= inspect(@item.job.args) %></td> | ||
</tr> | ||
<tr> | ||
<th>Enqueued At</th> | ||
<td><%= human_time(@item.job.enqueued_at) %></td> | ||
</tr> | ||
<tr> | ||
<th>Failed At</th> | ||
<td><%= human_time(@item.job.failed_at) %></td> | ||
</tr> | ||
<tr> | ||
<th>Last Retried At</th> | ||
<td><%= human_time(@item.job.retried_at) %></td> | ||
</tr> | ||
<tr> | ||
<th>Retry Count</th> | ||
<td><%= @item.job.retry_count %></td> | ||
</tr> | ||
<tr> | ||
<th>Error Module</th> | ||
<td><%= @item.job.error_class %></td> | ||
</tr> | ||
<tr> | ||
<th>Error Message</th> | ||
<td><pre><%= @item.job.error_message %></pre></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="col-4 my-2"> | ||
<%= for %{name: name, label: label} <- @actions do %> | ||
<%= link(label, | ||
class: "btn btn-danger btn-sm me-1", | ||
to: "#", | ||
phx_click: name, | ||
phx_value_raw: @item.raw | ||
) %> | ||
<% end %> | ||
</div> | ||
<div class="col-12"> | ||
<table class="my-2 table table-bordered"> | ||
<tbody> | ||
<tr> | ||
<th>Queue</th> | ||
<td><%= @item.job.queue %></td> | ||
</tr> | ||
<tr> | ||
<th>Module</th> | ||
<td><%= @item.job.class %></td> | ||
</tr> | ||
<tr> | ||
<th>JID</th> | ||
<td><%= @item.job.jid %></td> | ||
</tr> | ||
<tr> | ||
<th>Arguments</th> | ||
<td><%= inspect(@item.job.args) %></td> | ||
</tr> | ||
<tr> | ||
<th>Enqueued At</th> | ||
<td><%= human_time(@item.job.enqueued_at) %></td> | ||
</tr> | ||
<tr> | ||
<th>Failed At</th> | ||
<td><%= human_time(@item.job.failed_at) %></td> | ||
</tr> | ||
<tr> | ||
<th>Last Retried At</th> | ||
<td><%= human_time(@item.job.retried_at) %></td> | ||
</tr> | ||
<tr> | ||
<th>Retry Count</th> | ||
<td><%= @item.job.retry_count %></td> | ||
</tr> | ||
<tr> | ||
<th>Error Module</th> | ||
<td><%= @item.job.error_class %></td> | ||
</tr> | ||
<tr> | ||
<th>Error Message</th> | ||
<td><pre><%= @item.job.error_message %></pre></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<% else %> | ||
<div class="col-12"> | ||
<div class="my-2 alert alert-danger">Job not found</div> | ||
</div> | ||
<div class="col-12"> | ||
<div class="my-2 alert alert-danger">Job not found</div> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 35 additions & 17 deletions
52
lib/exq_ui_web/live/components/pagination_component.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,37 @@ | ||
<div> | ||
<%= if @total_page > 0 do %> | ||
<nav class="my-2"> | ||
<ul class="pagination pagination-sm justify-content-end mb-0"> | ||
<li class={"page-item #{if @current_page == 1, do: "disabled"}"}> | ||
<%= link "«", class: "page-link", to: "#", phx_page_loading: true, phx_click: "page", phx_value_page: 1 %> | ||
</li> | ||
<%= for i <- @start_page..@end_page do %> | ||
<li class={"page-item #{if @current_page == i, do: "active"}"}> | ||
<%= link i, class: "page-link", to: "#", phx_page_loading: true, phx_click: "page", phx_value_page: i %> | ||
</li> | ||
<% end %> | ||
<li class={"page-item #{if @current_page == @total_page, do: "disabled"}"}> | ||
<%= link "»", class: "page-link", to: "#", phx_page_loading: true, phx_click: "page", phx_value_page: @total_page %> | ||
</li> | ||
</ul> | ||
</nav> | ||
<% end %> | ||
<%= if @total_page > 0 do %> | ||
<nav class="my-2"> | ||
<ul class="pagination pagination-sm justify-content-end mb-0"> | ||
<li class={"page-item #{if @current_page == 1, do: "disabled"}"}> | ||
<%= link("«", | ||
class: "page-link", | ||
to: "#", | ||
phx_page_loading: true, | ||
phx_click: "page", | ||
phx_value_page: 1 | ||
) %> | ||
</li> | ||
<%= for i <- @start_page..@end_page do %> | ||
<li class={"page-item #{if @current_page == i, do: "active"}"}> | ||
<%= link(i, | ||
class: "page-link", | ||
to: "#", | ||
phx_page_loading: true, | ||
phx_click: "page", | ||
phx_value_page: i | ||
) %> | ||
</li> | ||
<% end %> | ||
<li class={"page-item #{if @current_page == @total_page, do: "disabled"}"}> | ||
<%= link("»", | ||
class: "page-link", | ||
to: "#", | ||
phx_page_loading: true, | ||
phx_click: "page", | ||
phx_value_page: @total_page | ||
) %> | ||
</li> | ||
</ul> | ||
</nav> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.