<% content_for :body do %>
<% unless notice.blank? %> <% end %>
<% content_for :javascripts do %> <% end %>

Application

<%= link_to 'Back to Applications', applications_path %>    |    <%= link_to 'Edit', edit_application_path(@application) %> <% if @application.application_schedule.present? -%>    |    <%= link_to "Add Affinity", new_application_application_schedule_application_schedule_affinity_tab_path(@application, @application.application_schedule) %> <% end -%>

<% if @application.application_schedule.present? %> <% end %>
Attribute Value
ID <%= @application.id %>
Created At <%= @application.created_at %>
Updated At <%= @application.updated_at %>
Deleted <%= @application.deleted %>
Application Type <%= @application.application_type.script_type_name %>
Command <%= @application.command %>
Title <%= @application.title %>
Short Name <%= @application.short_name %>
Log Level <%= @application.log_level %>
Script Type Name <%= @logical_application.script_type_name %>
Application Run Group Name <%= @logical_application.application_run_group_name %>
Application Run Group Limit <%= @application.application_schedule.application_run_group_limit %>
Application Run Group Restriction Name <%= @logical_application.application_run_group_restriction_name %>
Run Interval <%= @logical_application.run_interval %>
Run Start Minute <%= @logical_application.run_start_minute %>
Priority <%= @logical_application.priority %>
Visible <%= @logical_application.visible %>
Enabled <%= @logical_application.enabled %>
Enqueue Backlogs <%= @logical_application.enqueue_backlogs %>
<%= link_to "Application Schedule Affinity Tabs", application_application_schedule_application_schedule_affinity_tabs_path(@application, @application.application_schedule) %> <%= @logical_application.affinities %>
Add Script to Jobs Queue <%= link_to image_tag('control_play_blue.png', class: 'action', title: "Enqueue Application(\nid: #{@application.id},\ntitle: #{@application.title},\ncommand: #{@application.command})"), "#", { class: "enqueue", id: @application.id } %>

<% if @application.application_schedule.present? %>

Prerequisites

<% @application.application_schedule.application_schedule_prerequisites.each do |prereq| -%> <% end -%>
ID Command
<%= link_to prereq.prerequisite_application_schedule.id, application_path(prereq.prerequisite_application_schedule.application) %> <%= prereq.prerequisite_application_schedule.application.command %>

<% end %>

Last Queued Job

<% @application.historical_jobs.order('created_at desc').limit(10).each do |job| -%> <% job = ::Logical::Naf::Job.new(job) %> <% end -%>
ID Last Queued At Command Status
<%= link_to job.id, historical_job_path(job) %> <%= "#{time_ago_in_words(job.created_at, true)} ago" %> <%= job.command %><%= job.status %>

<% end %> <%= render partial: 'naf/shared/application' %>