app/views/index.erb in sidekiq-merger-0.0.9 vs app/views/index.erb in sidekiq-merger-0.0.10

- old
+ new

@@ -1,35 +1,62 @@ -<html> +<!DOCTYPE html> +<html lang="en"> <head> -<meta charset="UTF-8"> + <meta charset="UTF-8"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> </head> <body> - <h1>Sidekiq Merger</h1> - <% if flash[:notice] %> - <p style="color: green; font-weight: bold;"><%= flash[:notice] %></p> - <% end %> - <p> - <a href="/sidekiq" target="_blank">Open sidekiq console</a> - </p> - <h2>Workers</h2> - <div style="margin-left: 20px;"> - <h3>SomeWorker</h3> - <div> - <form action="/some_worker/perform_in" method="post" style="display: inline-block;"> - <input type="submit" name="perform_in" value="perform_in"> - </form> - <form action="/some_worker/perform_in" method="post" style="display: inline-block;"> - <input type="submit" name="perform_async" value="perform_async"> - </form> + <header class="navbar"> + <div class="container"> + <h1>Sidekiq Merger</h1> + <a href="https://github.com/dtaniwaki/sidekiq-merger">View Source on GitHub →</a> </div> - <h3>UniqueWorker</h3> + </header> + <div class="container"> + <% if flash[:notice] %> + <div class="alert alert-info"> + <a href="#" class="close" data-dismiss="alert">&times;</a> + <p><%= flash[:notice] %></p> + </div> + <% end %> + <p class="lead"> + Click the `perform_in` buttons to create or merge tasks until the execution time (in 60s).<br> + Click the `perform_async` buttons to execute a single task.<br><br> + Open <a href="/sidekiq/merges?poll=true" target="_blank">sidekiq console</a> to check what happens. + </p> <div> - <form action="/unique_worker/perform_in" method="post" style="display: inline-block;"> - <input type="submit" name="perform_in" value="perform_in"> - </form> - <form action="/unique_worker/perform_in" method="post" style="display: inline-block;"> - <input type="submit" name="perform_async" value="perform_async"> - </form> + <h2>SomeWorker</h2> + <p> + <code>sidekiq_options merger: { unique: false }</code> + </p> + <p class="lead"> + <small>Tasks will be merged regardless of uniqueness.</small> + </p> + <div> + <form action="/some_worker/perform_in" method="post" style="display: inline-block;"> + <input type="submit" name="perform_in" value="perform_in" class="btn btn-primary"> + </form> + <form action="/some_worker/perform_in" method="post" style="display: inline-block;"> + <input type="submit" name="perform_async" value="perform_async" class="btn btn-default"> + </form> + </div> + <h2>UniqueWorker</h2> + <p> + <code>sidekiq_options merger: { unique: true }</code> + </p> + <p class="lead"> + <small>Tasks will be merged if they haven't added already.</small> + </p> + <div> + <form action="/unique_worker/perform_in" method="post" style="display: inline-block;"> + <input type="submit" name="perform_in" value="perform_in" class="btn btn-primary"> + </form> + <form action="/unique_worker/perform_in" method="post" style="display: inline-block;"> + <input type="submit" name="perform_async" value="perform_async" class="btn btn-default"> + </form> + </div> </div> </div> + <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script> + <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </body> </html>