akira / exq_ui

UI Dashboard for Exq, a job processing library for Elixir. Exq UI provides the UI dashboard to display stats on job processing.
Other
154 stars 73 forks source link

setting live_socket_path option in live_exq_ui does not work #118

Closed ryanlchandler closed 2 years ago

ryanlchandler commented 2 years ago

In phoenix router.ex setting option :live_socket_path to "/myapp/exq/live"

defmodule DemoWeb.Router do
  use Phoenix.Router
  import ExqUIWeb.Router

  pipeline :browser do
    plug :fetch_session
    plug :protect_from_forgery
  end

  scope "/", DemoWeb do
    pipe_through :browser

    live_exq_ui("/myapp/exq", [live_socket_path: "/myapp/exq/live"])
  end
end

However, web socket requests continue going to /live


I think this is because app.js is hard coded to /live

https://github.com/akira/exq_ui/blob/7d561d717d1dc594916a1065696d0d3fbf729ed1/assets/js/app.js#L28

Not sure if this is a bug or I'm doing something wrong, please advise.

ananthakumaran commented 2 years ago

could you try this fix https://github.com/akira/exq_ui/pull/119

ryanlchandler commented 2 years ago

That worked! Thanks @ananthakumaran !!

williamweckl commented 2 years ago

Has this fix been released to hex?

ananthakumaran commented 2 years ago

Not yet. @akira could you cut a release when you have time.

akira commented 2 years ago

Just released, thanks for the heads up! 👍