<% if @cron_schedules.present? %>
<% @cron_schedules.each do |job_key, job| %> <% end %>
Cron Job Name Configuration Set  <%= tag.button "Toggle", type: "button", class: "btn btn-sm btn-outline-primary", role: "button", data: { bs_toggle: "collapse", bs_target: ".job-properties" }, aria: { expanded: false, controls: @cron_schedules.map { |job_key, _| "##{job_key.to_param}" }.join(" ") } %> Class Description Next scheduled
<%= job_key %> <%= job[:cron] %> <%= case job[:set] when NilClass "None" when Proc "Lambda/Callable" when Hash tag.button("Preview", type: "button", class: "btn btn-sm btn-outline-primary", role: "button", data: { bs_toggle: "collapse", bs_target: "##{job_key.to_param}" }, aria: { expanded: false, controls: job_key.to_param }) + tag.pre(JSON.pretty_generate(job[:set]), id: job_key.to_param, class: "collapse job-properties") end %> <%= job[:class] %> <%= job[:description] %> <%= Fugit.parse_cron(job[:cron]).next_time.to_local_time %>
<% else %> No cron jobs present. <% end %>