Class: Kube::Station::KindsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/kube/station/kinds_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#default_url_options

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
# File 'app/controllers/kube/station/kinds_controller.rb', line 6

def index
  @group = params[:group_id]
  @version = params[:version_id]
  group_match = @group == "core" ? "" : @group
  @kinds = fetch_api_resources
    .select { |r| (r[:group] || "") == group_match && r[:version] == @version }
    .sort_by { |r| r[:kind] }
end