Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Web UI Dashboard #50

Closed
strzibny opened this issue Jul 23, 2020 · 6 comments
Closed

Create Web UI Dashboard #50

strzibny opened this issue Jul 23, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@strzibny
Copy link

Is UI similar to Sidekiq UI available or planned?

@bensheldon
Copy link
Owner

Thanks for asking!

I've put a little thought into it, but nothing firmly held:

  • A UI would be fun. Sidekiq's chart is very satisfying.
  • A UI would be fairly easy to build given GoodJob is Rails and Postgres.
  • 👍 : economical person's Kibana wallboard. Visually see status of latency and queue depth. Quick feedback that things are working.
  • 👎 : administrative tool for deleting or re-enqueing or deeply inspecting the status or errors of jobs.

I don't have a lot of experience building and securing Rails Engines or the like, but would welcome contributions that are inline with the thoughts above. And also welcome to start small, eg a table of worked jobs. Or a simple chart. Release it and iterate.

@bensheldon bensheldon changed the title good_job UI Create Web UI Dashboard Jul 23, 2020
@inopinatus
Copy link

There are differential user stories here according to scale. Many users will be satisfied with a minimal interface, for which delayed_job_web is my own reference point, but anyone coming from a large Sidekiq install will bring more sophisticated preferences.

@bensheldon bensheldon added the enhancement New feature or request label Aug 11, 2020
@gadimbaylisahil
Copy link
Contributor

gadimbaylisahil commented Aug 12, 2020

I have started testing out GoodJob for one of our production applications, if all goes well with testing, I would be glad to take on/help with this project.

@bensheldon
Copy link
Owner

Thanks @gadimbaylisahil! I hope it goes well 😓

@bensheldon
Copy link
Owner

bensheldon commented Aug 20, 2020

This feature is next up in the backlog. I wanted to start flushing it out. Iterative development is great, all of these features are not expected to land together.

  • Table of enqueued jobs:
    Note: GoodJob creates a new job record when a job errors and is retried. e.g. there will exist multiple GoodJob::Job IDs/records for the same ActiveJob ID. Some kind of grouping would be nice to have, but not necessary initially.

    Columns:

    • Scheduled at
    • Queue
    • Job Class
    • Arguments
  • Charts.

    • Scheduled jobs by time slot
    • Executed jobs by time slot (split by whether they finished succesfully or errored)
    • Queue latency, the delta between a job is scheduled to run and when it actually runs. Example SQL:
      SELECT
          queue_name,
          date_trunc('hour', CAST(performed_at AS timestamp)) AS performed_at,
          EXTRACT(epoch FROM avg(latency)) AS avg
      FROM (
               SELECT
                   (performed_at - scheduled_at) AS latency,
                   finished_at AS finished_at,
                   performed_at AS performed_at,
                   queue_name AS queue_name
               FROM good_jobs
           ) source
      WHERE finished_at IS NOT NULL
      GROUP BY date_trunc('hour', CAST(performed_at AS timestamp)), queue_name
      ORDER BY queue_name ASC, date_trunc('hour', CAST(performed_at AS timestamp)) ASC
      

In regards to packaging , I would like to see the dashboard included in GoodJob (not in a separate gem). I think that would imply it is a mountable Rails Engine. Packaging it together ensures compatibility and makes integration testing much easier.

i would like to see the dashboard implemented without additional dependencies beyond what is available with Vanilla Rails. I'm not sure what the current status is of sprockets/webpacker for Rails Engines, so simply inlining CSS/JS assets is perfectly acceptable for now. Boring HTML, simple and modern CSS (flexbox, grid) are perfectly acceptable. I've done some research on lightweight charting tools and Chartist.js looks fine.

Getting Started: a first PR could simply implement a table with the most recent 100 jobs. That would be an excellent start.

@bensheldon
Copy link
Owner

GoodJob now has a functional web dashboard 🎉 . It can always use improvements, but I think the goals of this issue have been achieved 🙌 https://github.com/bensheldon/good_job#dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants