Sidekiq: [WEB UI] add link to return to the app

Created on 1 Aug 2014  路  15Comments  路  Source: mperham/sidekiq

Right now there is no way to return to the app once we are in the dashboard unless we enter the URL manually or hit back x times.

I propose to add button or set the logo to redirect to configurable path.
Let me know if i should start working on this.

All 15 comments

Put a link to your app in your browser's bookmark bar. Problem solved.

the logo is more accessible than the bookmark, especially if using a public computer or touch devices.

Is it reasonable for the Sidekiq logo to link to someone's app? The Sidekiq logo should link to the root of Sidekiq Web.

I like the button idea better: what should the button say?

The user can put any text he want or even a img tag, that will be wrapped in a link_to the desired path.
We could have 'Back to Application' as default

Sounds good, let's see what you come up with. Please include desktop and mobile screenshots when you're ready.

Ok i will do a quick screenshoot in few minutes then implement it.

small screen

Large screen

What about putting it next to Live Poll in the top right?

I did that too. But it look strange, let me redo it.


I can make each button inline

I like it up top, it just needs a bit of polish, esp in mobile.

  1. Maybe "Back to App" so it's a little shorter?
  2. The button should not render unless the user gives a url to use. How does the developer set the URL?

1) sure. It was just for demo.
2) i'm thinking about

  # config/initializers/sidekiq.rb
  Sidekiq.configure_webui do |config|
       config.app_url = '/admin' # admin_path if using rails , default: nil
       config.back_button_html = 'Return to my app' # default: 'Back to App'
       config.back_button_class =  'btn btn-info' # default: 'btn btn-inverse'
  end

the back_button_html is not sanitized.

Let's keep it dead simple, app_url only. Sidekiq::Web.app_url = 'http://foobar.com'?

Better.

I'm not proud of this, but I spent a fair amount of time finding an alternative and couldn't find anything - if there is an alternative then please let me know!

I have a Rails app that just has Sidekiq with Devise for auth and all I wanted to do was add a Logout link to the Sidekiq Web UI hence how I ended up here. So I set the app_url to be /users/sign_out, but having the button say 'Back to App' was pretty confusing so I did the following:

# Put in config/initializers/sidekiq.rb
require 'sidekiq/web'
Sidekiq::Web.app_url = '/users/sign_out">Logout</a><a style="display:none'

Which renders the button html as the following, hiding the second link it creates:

<a class="btn btn-inverse" href="/users/sign_out">Logout</a><a style="display:none">Back to App</a>

I know, cringe, but it did the trick and maybe it'll be a bit of hacky help for someone else until an alternative is created (if it doesn't already exist).

Was this page helpful?
0 / 5 - 0 ratings