mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
Merge pull request #67 from plukevdh/master
Fix for use with sinatra-cache
This commit is contained in:
commit
d460e6b991
5 changed files with 12 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
<%= File.read(File.join(File.dirname(__FILE__), 'views', 'assets', 'styles.css')) %>
|
||||
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
|
||||
|
||||
<header class="row">
|
||||
<div class="col-md-5">
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<%= erb File.read(File.join(File.dirname(__FILE__), 'views', '_worker_nav.erb')) %>
|
||||
<%= erb File.read(File.join(view_path, '_worker_nav.erb')) %>
|
||||
|
||||
<div class="col-md-9">
|
||||
<table class="table table-striped table-bordered table-hover table-white" style="width: 100%; margin: 0; table-layout:fixed;">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= File.read(File.join(File.dirname(__FILE__), 'views', 'assets', 'styles.css')) %>
|
||||
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
|
||||
|
||||
<header class="row">
|
||||
<div class="col-md-5">
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<%= erb File.read(File.join(File.dirname(__FILE__), 'views', '_home_nav.erb')) %>
|
||||
<%= erb File.read(File.join(view_path, '_home_nav.erb')) %>
|
||||
|
||||
<div class="col-md-9">
|
||||
<% if @locks.length > 0 %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= File.read(File.join(File.dirname(__FILE__), 'views', 'assets', 'styles.css')) %>
|
||||
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
|
||||
|
||||
<header class="row">
|
||||
<div class="col-md-5">
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<%= erb File.read(File.join(File.dirname(__FILE__), 'views', '_worker_nav.erb')) %>
|
||||
<%= erb File.read(File.join(view_path, '_worker_nav.erb')) %>
|
||||
|
||||
<div class="col-md-9">
|
||||
<% if (recurrences = @schedule.recurrence_rules).length > 0 %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= File.read(File.join(File.dirname(__FILE__), 'views', 'assets', 'styles.css')) %>
|
||||
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
|
||||
|
||||
<header class="row">
|
||||
<div class="col-sm-5">
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<%= erb File.read(File.join(File.dirname(__FILE__), 'views', '_home_nav.erb')) %>
|
||||
<%= erb File.read(File.join(view_path, '_home_nav.erb')) %>
|
||||
|
||||
<div class="col-md-9">
|
||||
<% if @workers.length > 0 %>
|
||||
|
|
|
@ -8,13 +8,13 @@ module Sidetiq
|
|||
app.get "/sidetiq" do
|
||||
@workers = Sidetiq.workers
|
||||
@time = Sidetiq.clock.gettime
|
||||
erb File.read(File.join(VIEWS, 'sidetiq.erb'))
|
||||
erb File.read(File.join(VIEWS, 'sidetiq.erb')), locals: {view_path: VIEWS}
|
||||
end
|
||||
|
||||
app.get "/sidetiq/locks" do
|
||||
@locks = Sidetiq::Lock::Redis.all.map(&:meta_data)
|
||||
|
||||
erb File.read(File.join(VIEWS, 'locks.erb'))
|
||||
erb File.read(File.join(VIEWS, 'locks.erb')), locals: {view_path: VIEWS}
|
||||
end
|
||||
|
||||
app.get "/sidetiq/:name/schedule" do
|
||||
|
@ -28,7 +28,7 @@ module Sidetiq
|
|||
|
||||
@schedule = @worker.schedule
|
||||
|
||||
erb File.read(File.join(VIEWS, 'schedule.erb'))
|
||||
erb File.read(File.join(VIEWS, 'schedule.erb')), locals: {view_path: VIEWS}
|
||||
end
|
||||
|
||||
app.get "/sidetiq/:name/history" do
|
||||
|
@ -44,7 +44,7 @@ module Sidetiq
|
|||
redis.lrange("sidetiq:#{name}:history", 0, -1)
|
||||
end
|
||||
|
||||
erb File.read(File.join(VIEWS, 'history.erb'))
|
||||
erb File.read(File.join(VIEWS, 'history.erb')), locals: {view_path: VIEWS}
|
||||
end
|
||||
|
||||
app.post "/sidetiq/:name/trigger" do
|
||||
|
|
Loading…
Reference in a new issue