<%= label(:status, "Status:") %>
<%= select_tag("search[status]",
options_for_select([["All", nil],
["Queued", :queued],
["Running", :running],
["Waiting", :waiting],
["Finished", :finished],
["Errored", :errored]], @search_status),
{ class: 'datatable_variable' }) %>
<%= label(:started_on_machine_id, "Machine:") %>
<%= select(:search, :started_on_machine_id,
Naf::Machine.all.collect {
|m| [m.short_name_if_it_exist.blank? ? m.server_address : m.short_name_if_it_exist, m.id]
}.sort.unshift(["All", nil]), {}, { class: 'datatable_variable' }) %>
<%= label(:time_format, "Time format:") %>
<%= select_tag(:time_format, options_for_select([["Lexically", :lexically], ["Timestamp", :timestamp]])) %>
<%= link_to 'Show additional search parameters', '#', id: 'search_container_link' %>
<%= form_tag(naf.historical_jobs_path, method: "get", id: 'job_search', class: 'search_select_input') do %>
<%= label(:command, "Command:") %>
<%= text_field(:search, :command, { class: 'datatable_variable' }) %>
<%= label(:application_run_group_name, "Run Group:") %>
<%= text_field(:search, :application_run_group_name, { class: 'datatable_variable' }) %>
<%= label(:pid, "Pid:") %>
<%= text_field(:search, :pid, { class: 'datatable_variable' }) %>
<%= label(:application_type_id, "Script Type:") %>
<%= select(:search, :application_type_id,
Naf::ApplicationType.all.collect {
|type| [type.script_type_name, type.id]
}.sort.unshift(["All", nil]), {}, { class: 'datatable_variable', style: "width:170px" }) %>
<%= label(:application_run_group_restriction_id, "Run Group Restriction:") %>
<%= select(:search, :application_run_group_restriction_id,
Naf::ApplicationRunGroupRestriction.all.collect {
|a| [a.application_run_group_restriction_name, a.id]
}.sort.unshift(["All", nil]), {}, { class: 'datatable_variable', style: "width:170px" }) %>
<%= label(:failed_to_start, "Failed to Start:") %>
<%= select(:search, :failed_to_start,
[["Ignore", nil], ["True", true], ["False", nil]],
{ }, { class: 'datatable_variable', style: "width:170px" }) %>
<%= label(:request_to_terminate, "Request to Terminate:") %>
<%= select(:search, :request_to_terminate,
[["Ignore", nil], ["True", true], ["False", false]],
{}, { class: 'datatable_variable', style: "width:170px" }) %>
<%= label(:exit_status, "Exit Status:") %>
<%= text_field(:search, :exit_status, { class: 'datatable_variable' }) %>
<%= label(:priority, "Priority:") %>
<%= text_field(:search, :priority, { class: 'datatable_variable' }) %>
<%= submit_tag("Search") %>
<% end %>
<% content_for :javascripts do %>
<% end %>