Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h2>Service: <%= h(@service.name) %></h2>
- <div>
- <ul id="actions">
- <li><%= link_to '← Back', services_path %></li>
- <li><%= link_to 'Edit', edit_service_path(@service) %></li>
- <li><%= link_to 'x Delete', service_path(@service), :method => 'delete', :confirm => 'Are you sure you want to delete this service?' %></li>
- </ul>
- </div>
- <ul>
- <li>Name: <%= h(@service.name) %></li>
- <li>Period: <%= @service.period.nil? ? "N/A" : @service.period %></li>
- <li>Enabled: <%= @service.enabled ? 'YES' : 'NO' %></li>
- <li>Start At: <%= @service.start_at.nil? ? " Continous" : better_time_ago_in_words(@service.start_at.to_s) %></li>
- <li>Create At: <%= @service.create_at.nil? ? " N/A" : time_ago_in_words(@service.create_at) %></li>
- </ul>
- <fieldset>
- <legend>Tasks</legend>
- <table>
- <thead>
- <tr>
- <th>id</th>
- <th>T</th>
- <th>ST</th>
- <th>remaining</th>
- <th>errors</th>
- <th>total_job</th>
- <th>name</th>
- <th>min_jobcode</th>
- <th>max_iteration</th>
- <th>max_batch</th>
- <th>last run</th>
- <th>first run<th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <% @service.service_tasks.each do |service_task| %>
- <tr <%= 'class="disabled"' if service_task.has_not_started? %>>
- <td><%= service_task.id%></td>
- <td><%= status_light service_task.task.enabled? %></td>
- <td><%= status_light service_task.enabled? %></td>
- <td><%= service_task.info.remaining unless service_task.info.nil? %></td>
- <td><%= service_task.info.db_errors unless service_task.info.nil? %></td>
- <td><%= service_task.info.total_jobs unless service_task.info.nil? %></td>
- <td><%= link_to h(service_task.task.name), task_path(service_task.task)%> </td>
- <td><%= service_task.info.min_jobcode unless service_task.info.nil? %></td>
- <td><%= service_task.info.max_iteration unless service_task.info.nil? %></td>
- <td><%= service_task.info.max_batch unless service_task.info.nil? %></td>
- <td><%= service_task.last_run_at.nil? ? "Never" : time_ago_in_words(service_task.last_run_at)%></td>
- <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>
- </tr>
- <% end %>
- </tbody>
- </table>
- </fieldset>
Advertisement
Add Comment
Please, Sign In to add comment