Guest User

Untitled

a guest
Feb 12th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. <h2>Service: <%= h(@service.name) %></h2>
  2. <div>
  3. <ul id="actions">
  4. <li><%= link_to '&larr; Back', services_path %></li>
  5. <li><%= link_to 'Edit', edit_service_path(@service) %></li>
  6. <li><%= link_to 'x Delete', service_path(@service), :method => 'delete', :confirm => 'Are you sure you want to delete this service?' %></li>
  7. </ul>
  8. </div>
  9.  
  10. <ul>
  11. <li>Name: <%= h(@service.name) %></li>
  12. <li>Period: <%= @service.period.nil? ? "N/A" : @service.period %></li>
  13. <li>Enabled: <%= @service.enabled ? 'YES' : 'NO' %></li>
  14. <li>Start At: <%= @service.start_at.nil? ? " Continous" : better_time_ago_in_words(@service.start_at.to_s) %></li>
  15. <li>Create At: <%= @service.create_at.nil? ? " N/A" : time_ago_in_words(@service.create_at) %></li>
  16. </ul>
  17.  
  18. <fieldset>
  19. <legend>Tasks</legend>
  20. <table>
  21. <thead>
  22. <tr>
  23. <th>id</th>
  24. <th>T</th>
  25. <th>ST</th>
  26. <th>remaining</th>
  27. <th>errors</th>
  28. <th>total_job</th>
  29. <th>name</th>
  30. <th>min_jobcode</th>
  31. <th>max_iteration</th>
  32. <th>max_batch</th>
  33. <th>last run</th>
  34. <th>first run<th>
  35. <th></th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <% @service.service_tasks.each do |service_task| %>
  40. <tr <%= 'class="disabled"' if service_task.has_not_started? %>>
  41. <td><%= service_task.id%></td>
  42. <td><%= status_light service_task.task.enabled? %></td>
  43. <td><%= status_light service_task.enabled? %></td>
  44. <td><%= service_task.info.remaining unless service_task.info.nil? %></td>
  45. <td><%= service_task.info.db_errors unless service_task.info.nil? %></td>
  46. <td><%= service_task.info.total_jobs unless service_task.info.nil? %></td>
  47. <td><%= link_to h(service_task.task.name), task_path(service_task.task)%> </td>
  48. <td><%= service_task.info.min_jobcode unless service_task.info.nil? %></td>
  49. <td><%= service_task.info.max_iteration unless service_task.info.nil? %></td>
  50. <td><%= service_task.info.max_batch unless service_task.info.nil? %></td>
  51. <td><%= service_task.last_run_at.nil? ? "Never" : time_ago_in_words(service_task.last_run_at)%></td>
  52. <td><%= link_to("view", service_task_queue_items_path(@service, service_task.task, {:batch=>service_task.info.max_batch, :iteration=>service_task.info.max_iteration})) unless service_task.info.nil? %> </td>
  53. </tr>
  54. <% end %>
  55. </tbody>
  56. </table>
  57. </fieldset>
Advertisement
Add Comment
Please, Sign In to add comment