<%= status.managed?? "Yes" : "" %> |
<%= status.name %> |
<%= schema_batch.try(:ran_times).to_i %>/<%= status.times_limit || 0 %> |
<% if last_ran_at = schema_batch.try(:last_ran_at) %>
<%= last_ran_at.strftime('%Y-%m-%d %H:%M:%S') %>
<% end %>
|
<%= status.created_at.strftime('%Y-%m-%d %H:%M:%S') if status.created_at %> |
<% if File.exist?(BatchManager::Logger.log_file_path(status.name)) %>
<%= link_to "DRY", log_batch_url(escape_batch_name(status.name)), :class => "btn info" %>
<%= link_to "X", remove_log_batch_url(escape_batch_name(status.name)), :class => "btn danger", :onclick => "return confirm('Are you sure?')" %>
<% end %>
<% if File.exist?(BatchManager::Logger.log_file_path(status.name, true)) %>
<%= link_to "WET", log_batch_url(escape_batch_name(status.name), :wet => true), :class => "btn info" %>
<%= link_to "X", remove_log_batch_url(escape_batch_name(status.name), :wet => true), :class => "btn danger", :onclick => "return confirm('Are you sure?')" %>
<% end %>
|
<%= link_to "EDIT", edit_batch_url(escape_batch_name(status.name)), :class => "btn info" %>
<% if status.managed? %>
<%= link_to "DRY RUN", exec_batch_url(escape_batch_name(status.name)), :class => "btn info" %>
<% if status.can_run? %>
<%= link_to "WET RUN", exec_batch_url(escape_batch_name(status.name), :wet => true), :class => "btn danger", :onclick => "return confirm('Are you sure?')" %>
<% else %>
<%= link_to "WET RUN", "#", :class => "btn disabled", :onclick => "return false" %>
<% end %>
<% else %>
<%= link_to "DRY RUN", "#", :class => "btn disabled", :onclick => "return false" %>
<%= link_to "WET RUN", "#", :class => "btn disabled", :onclick => "return false" %>
<% end %>
|
<% end %>