-
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.
Merge pull request #125 from akira/phx-live-0.18
add support for phx-live 0.18
- Loading branch information
Showing
27 changed files
with
146 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
config :exq, | ||
name: Exq, | ||
|
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,4 +1,4 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
# Do not include metadata nor timestamps in development logs | ||
config :logger, :console, format: "[$level] $message\n" |
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,4 +1,4 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
# Print only warnings and errors during test | ||
config :logger, level: :warn | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.RealtimeStatsComponent, id: "realtime-stats" %> | ||
<%= live_component ExqUIWeb.HistoricalStatsComponent, id: "historical-stats" %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.RealtimeStatsComponent} id="realtime-stats" /> | ||
<.live_component module={ExqUIWeb.HistoricalStatsComponent} id="historical-stats" /> |
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,2 +1,2 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.TableComponent, id: "dead-table", actions: @actions, columns: @columns, items: @items, total: @total, current_page: @current_page, page_size: @page_size %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.TableComponent} id="dead-table" actions={@actions} columns={@columns} items={@items} total={@total} current_page={@current_page} page_size={@page_size} /> |
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,2 +1,2 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.JobDetailsComponent, id: "jobs-details", item: @item, actions: @actions %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.JobDetailsComponent} id="jobs-details" item={@item} actions={@actions} /> |
2 changes: 1 addition & 1 deletion
2
...xq_ui_web/live/queue_live/index.html.leex → ...xq_ui_web/live/queue_live/index.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
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,9 +1,9 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<div class="row"> | ||
<div col="col-16"> | ||
<div class="d-flex align-items-center"> | ||
<span class="text-muted">Enqueued jobs in <b><%= @name %></b> queue: <b><%= @total %></b></span> | ||
</div> | ||
</div> | ||
</div> | ||
<%= live_component ExqUIWeb.TableComponent, id: "queues-table", actions: @actions, columns: @columns, items: @items, total: @total, current_page: @current_page, page_size: @page_size %> | ||
<.live_component module={ExqUIWeb.TableComponent} id="queues-table" actions={@actions} columns={@columns} items={@items} total={@total} current_page={@current_page} page_size={@page_size} /> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.TableComponent, id: "retry-table", actions: @actions, columns: @columns, items: @items, total: @total, current_page: @current_page, page_size: @page_size %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.TableComponent} id="retry-table" actions={@actions} columns={@columns} items={@items} total={@total} current_page={@current_page} page_size={@page_size} /> | ||
|
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,2 +1,2 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.JobDetailsComponent, id: "jobs-details", item: @item, actions: @actions %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.JobDetailsComponent} id="jobs-details" item={@item} actions={@actions} /> |
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,2 +1,2 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.TableComponent, id: "scheduled-table", actions: @actions, columns: @columns, items: @items, total: @total, current_page: @current_page, page_size: @page_size %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.TableComponent} id="scheduled-table" actions={@actions} columns={@columns} items={@items} total={@total} current_page={@current_page} page_size={@page_size} /> |
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,2 +1,2 @@ | ||
<%= live_component ExqUIWeb.StatsComponent, id: "stats" %> | ||
<%= live_component ExqUIWeb.JobDetailsComponent, id: "jobs-details", item: @item, actions: @actions %> | ||
<.live_component module={ExqUIWeb.StatsComponent} id="stats" /> | ||
<.live_component module={ExqUIWeb.JobDetailsComponent} id="jobs-details" item={@item} actions={@actions} /> |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
defmodule ExqUIWeb.QueueLive.ShowTest do | ||
use ExqUI.ConnCase | ||
|
||
test "/queues/hard", %{conn: conn} do | ||
{:ok, view, _} = live(conn, "/queues/hard") | ||
html = render(view) | ||
|
||
assert html =~ ~r/Hardworker.*428/ | ||
end | ||
|
||
test "delete_all", %{conn: conn} do | ||
{:ok, view, _} = live(conn, "/queues/hard") | ||
|
||
html = | ||
element( | ||
view, | ||
"#table-component" | ||
) | ||
|> render_hook("action", %{"table" => %{"action" => "delete_all"}}) | ||
|
||
refute html =~ ~r/Hardworker.*428/ | ||
end | ||
|
||
test "delete", %{conn: conn} do | ||
{:ok, view, _} = live(conn, "/queues/hard") | ||
|
||
html = | ||
element( | ||
view, | ||
"#table-component" | ||
) | ||
|> render_hook("action", %{ | ||
"table" => %{ | ||
"24b09253-1bbe-4d8a-804a-582d3541d31b" => | ||
"{\"args\":[428],\"class\":\"Hardworker\",\"enqueued_at\":1638553683.274524,\"jid\":\"24b09253-1bbe-4d8a-804a-582d3541d31b\",\"queue\":\"hard\",\"retry\":3}", | ||
"action" => "delete" | ||
} | ||
}) | ||
|
||
refute html =~ ~r/Hardworker.*428/ | ||
end | ||
end |
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.