Coder Social home page Coder Social logo

[Enhancement] WebUI about exq HOT 26 CLOSED

akira avatar akira commented on May 14, 2024
[Enhancement] WebUI

from exq.

Comments (26)

akira avatar akira commented on May 14, 2024

👍 this would be great to have. Would be preferable to structure it so Phoenix is not a dependency unless you use the UI - so not sure if this would mean a separate repo etc...

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Yea, i dont think we need a dependency on Phoenix but i think a dependency on plug is reasonable, most web servers use it.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

ok so ive got a basic plug module working that will run our webui and is mountable under phoenix, will also look into running it standalone. We maintain no dependency on Phoenix only plug.

Checkout https://github.com/structtv/exq/tree/webui for progress.

https://github.com/structtv/exq/blob/webui/web/router.ex

which is a plug that can be used with any server supporting plug. i think its sort of like elixir's rack.

It can be injected into phoenix's router like this

defmodule ExqUi.Router do
  use Phoenix.Router


  pipeline :before do
    plug :super
    plug Exq.RouterPlug, namespace: "exq"
  end


  scope "/" do
    # Use the default browser stack.
    pipe_through :browser
    get "/", ExqUi.PageController, :index, as: :pages
  end

  # Other scopes may use custom stacks.
  # scope "/api" do
  #   pipe_through :api
  # end
end

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

It is alive!!!!

screen shot 2014-10-25 at 3 42 51 am

screen shot 2014-10-25 at 3 42 39 am

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Created a mix task for starting the webui independent of an existing server.

Standalone web server uses the plug and cowboy, connection details to redis are passed at the command line.

defmodule Mix.Tasks.Exq.Ui do
  use Mix.Task

  @shortdoc "Starts the Exq UI Server"

  def run(args) do


    {opts, args, _} = OptionParser.parse args,
      switches: [host: :string, port: :integer, namespace: :string, queues: :string, webport: :integer]

    webport = Keyword.get(opts, :webport, 4040)

    Exq.start(opts) 
    IO.puts "Started ExqUI on Port #{webport}"
    Plug.Adapters.Cowboy.http Exq.RouterPlug, [namespace: ""], port: webport

    :timer.sleep(:infinity)
  end

end

ran as

mix exq.ui --namespace structtv --webport 7898

Where the redis namespace is structtv and the webui would run on port 7898.

Supports redis port and hostname via

mix exq.ui --namespace structtv --host 555.555.555.555 --port 5943

also

from exq.

akira avatar akira commented on May 14, 2024

Nice! 👍 for client JS client / API approach. I noticed some coffeescript, what is the approach compile assets?

I was having issues running due to the 'static' symlink, but I'm assuming I was missing the build step.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Hey Alex,

Yes you will need to install ember-cli and inside the priv/ember folder run
ember build i think before a release we would included the compiled code,
thats just me being lazy, ill also commit the built files incase you dont
want to dick with ember cli.

See: http://www.ember-cli.com/

On Sat, Oct 25, 2014 at 2:04 PM, Alex Kira [email protected] wrote:

Nice! [image: 👍] for client JS client / API approach. I noticed some
coffeescript, what is the approach compile assets?

I was having issues running due to the 'static' symlink, but I'm assuming
I was missing the build step.


Reply to this email directly or view it on GitHub
https://github.com/akira/exq/issues/7#issuecomment-60493834.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

I've included the built files on my branch.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

This has me thinking that prior to a release of this we should probably do a seperate repo for exq-ui which would be the source ember project, and the just include the build as the priv/static. I want to keep the ui source open of course, but we probably dont need to bundle the enitre ember project as part of exq and it can be somewhere else, and just ship the build/dist with exq.

from exq.

akira avatar akira commented on May 14, 2024

I haven't used ember previously (only angular / react). Is the compilation step required only for coffeescript, or is there things it is needed for? Just thinking, does switching to JS eliminate the build step?

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

All of the templates and es6 modules require compilation

Sent from my iPhone

On Oct 25, 2014, at 5:38 PM, Alex Kira [email protected] wrote:

I haven't used ember previously (only angular / react). Is the compilation
step required only for coffeescript, or is there things it is needed for?
Just thinking, does switching to JS eliminate the build step?


Reply to this email directly or view it on GitHub
#7 (comment).

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Ember cli also provides the sass compilation.

Sent from my iPhone

On Oct 25, 2014, at 5:38 PM, Alex Kira [email protected] wrote:

I haven't used ember previously (only angular / react). Is the compilation
step required only for coffeescript, or is there things it is needed for?
Just thinking, does switching to JS eliminate the build step?


Reply to this email directly or view it on GitHub
#7 (comment).

from exq.

akira avatar akira commented on May 14, 2024

A bit torn on this - on one hand it's not the best practice to check in compiled artifacts to a repo. However, it's also not that great to require all the additional dependencies just to run the UI, especially since it's just an admin interface. In an ideal world it would be great to have a solution where we can minimize asset build dependencies and just have the same code base to be able to edit and run.

However, given the two choices above, I can see going with checking in the compiled assets to the exq code base like you mentioned, and having a separate code base to generate them - this would lean towards it being easier to use by the end users versus it being easier to develop. We can go with that for now.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Got a graphing library installed gonna hook up to live data next: What do you think, obviously still needs some customization.

screen shot 2014-10-27 at 5 21 27 pm

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

screen shot 2014-10-27 at 6 37 54 pm

Queues view

from exq.

akira avatar akira commented on May 14, 2024

👏 That looks awesome!

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Added some process info stuff. Lets regroup on it when we're done with the PR because i think it could be tidied up to be closer to sidekiq, will want your input.

screen shot 2014-10-28 at 3 26 16 am

from exq.

akira avatar akira commented on May 14, 2024

Sure, let me know where to look at it. Also, not sure how to build the ui with ember-cli or where the assets go, let me know if I need to do that to get it running.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

i can jump on a google hangout tomorrow if u want me to walk you through the ember stuff.

from exq.

akira avatar akira commented on May 14, 2024

Cool, google hangout could be helpful, not sure about exact timing though. I can message you about timing tomorrow when I find out more.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Sounds good, will be fun to talk face to face :)

On Wed, Oct 29, 2014 at 12:14 AM, Alex Kira [email protected]
wrote:

Cool, google hangout could be helpful, not sure about exact timing though.
I can message you about timing tomorrow when I find out more.


Reply to this email directly or view it on GitHub
https://github.com/akira/exq/issues/7#issuecomment-60875238.

from exq.

akira avatar akira commented on May 14, 2024

Not sure if I can tonight, if I can will be late.

On Tuesday, October 28, 2014, Justin McNally [email protected]
wrote:

Added some process info stuff. Lets regroup on it when we're done with the
PR because i think it could be tidied up to be closer to sidekiq, will want
your input.

[image: screen shot 2014-10-28 at 3 26 16 am]
https://cloud.githubusercontent.com/assets/892382/4805394/44fc8fbe-5e7c-11e4-9f3d-7a1659806b46.png


Reply to this email directly or view it on GitHub
https://github.com/akira/exq/issues/7#issuecomment-60723003.

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Added ability to view failures.
screen shot 2014-11-09 at 2 10 20 am

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

I think for now, im going to remove scheduled / retries, finish a few of the crud related actions in queues/workers/failures, and we can ship. Also need to hook up graphs.

I think i can finish this tomorrow.

We can ammend retries / scheduled tasks once the backend starts to support that type of stuff.

from exq.

akira avatar akira commented on May 14, 2024

👍 for that and shipping

from exq.

j-mcnally avatar j-mcnally commented on May 14, 2024

Closing this for now in favor of smaller enhancement issues / requests.

from exq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.