Class: PactBroker::UI::Controllers::Groups

Inherits:
Base
  • Object
show all
Includes:
Services
Defined in:
lib/pact_broker/ui/controllers/groups.rb

Constant Summary

Constants included from Services

Services::SERVICE_FACTORIES

Instance Method Summary collapse

Methods included from Services

#badge_service, #branch_service, #certificate_service, #contract_service, #deployed_version_service, #environment_service, #get_service, #group_service, #index_service, #integration_service, #label_service, #matrix_service, #metrics_service, #pact_service, #pacticipant_service, #register_default_services, #register_service, #released_version_service, #tag_service, #verification_service, #version_service, #webhook_service, #webhook_trigger_service

Methods inherited from Base

#base_url

Instance Method Details

#locals(overrides) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/pact_broker/ui/controllers/groups.rb', line 29

def locals(overrides)
  pacticipant = pacticipant_service.find_pacticipant_by_name(params[:name])
  {
    csv_path: "#{base_url}/groups/#{ERB::Util.url_encode(params[:name])}.csv",
    max_pacticipants: PactBroker.configuration.network_diagram_max_pacticipants,
    pacticipant_name: params[:name],
    repository_url: pacticipant&.repository_url,
    base_url: base_url,
    pacticipant: pacticipant,
    details_url: "#{base_url}/pacticipants/#{ERB::Util.url_encode(params[:name])}",
    network_url: "#{base_url}/pacticipants/#{ERB::Util.url_encode(params[:name])}/network?maxPacticipants=#{PactBroker.configuration.network_diagram_max_pacticipants}"
  }.merge(overrides)
end