1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/web/views
Shayon Mukherjee 0ddc6c9858 Introduce the ability to pause queue from the UI (#4374)
* Introduce the ability to pause queue from the UI

Considering sidekiq web UI allow to perform complex tasks with ease.
Having the ability to pause a queue during an emergency (or operational intense)
scenarios would come in quite handy.

This PR introduces a new button to under the "Actions" column on `sidekiq/queues` pages,
right next to the `Delete` button. Depending on the state of the queue, it will according
show the `Pause` or `Unpause` text, with appropriate form element that `POST`s to the same
endpoint. The endpoint logic is updated to handle the new cases. Added some relevant unit tests.

Adding mock `Sidekiq::Queue#pause!` and `Sidekiq::Queue#unpause!` functions to
the API, which I believe will be overridden by sidekiq pro.

* Remove confirmation text and switch ordering of new copy in en.yml

* Only allow pause/unpause operations from sidekiq pro

This means the button from UI is hidden and api route has validation
in place such that it will only perform the respective pause/unpause
operation on proper payload, in sidekiq pro.

Its using `Sidekiq::Pro` constant as a check to detect whether or
not pro is present.

* Initialize Queue only once in api router action
2019-11-14 10:06:53 -08:00
..
_footer.erb Add link to docs in footer 2018-03-27 09:18:05 -07:00
_job_info.erb Polish job tags with Sidekiq Pro filtering support 2019-09-23 14:52:15 -07:00
_nav.erb Update _nav.erb (#4002) 2018-10-19 08:33:51 -07:00
_paging.erb Make Sidekiq Web UI RTL-friendly (#3381) 2017-03-16 13:51:29 -07:00
_poll_link.erb Implement compatibility interface with sinatra 2016-07-29 04:45:19 -03:00
_status.erb Fix missing status text 2013-09-23 10:13:51 -04:00
_summary.erb Remove size helpers 2015-01-16 14:03:19 -08:00
busy.erb Polish job tags with Sidekiq Pro filtering support 2019-09-23 14:52:15 -07:00
dashboard.erb Make Sidekiq Web UI RTL-friendly (#3381) 2017-03-16 13:51:29 -07:00
dead.erb Compress jobs backtraces 2019-09-16 09:02:38 -07:00
layout.erb Initial pass at dark mode support, courtesy of @silent-e 2019-09-27 10:27:45 -07:00
morgue.erb Polish job tags with Sidekiq Pro filtering support 2019-09-23 14:52:15 -07:00
queue.erb Polish job tags with Sidekiq Pro filtering support 2019-09-23 14:52:15 -07:00
queues.erb Introduce the ability to pause queue from the UI (#4374) 2019-11-14 10:06:53 -08:00
retries.erb Polish job tags with Sidekiq Pro filtering support 2019-09-23 14:52:15 -07:00
retry.erb Compress jobs backtraces 2019-09-16 09:02:38 -07:00
scheduled.erb Polish job tags with Sidekiq Pro filtering support 2019-09-23 14:52:15 -07:00
scheduled_job_info.erb Implement compatibility interface with sinatra 2016-07-29 04:45:19 -03:00