% if @cron_schedules.present? %>
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 | <% @cron_schedules.each do |job_key, job| %>
---|---|---|---|---|---|
<%= 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 %> |