Module: ForemanPatch::WindowPatchingHelper

Defined in:
app/helpers/foreman_patch/window_patching_helper.rb

Instance Method Summary collapse

Instance Method Details

#rounds(window) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/foreman_patch/window_patching_helper.rb', line 4

def rounds(window)
  window.rounds.map do |round|
    {
      name: round.name,
      link: round_path(round),
      priority: round.priority,
      hostsCount: round.invocations.count,
      hostsLink: main_app.hosts_path(search: "patch_round_id = #{round.id}"),
      status: round.status,
      actions: []
    }
  end
end