Sha256: 387f8709f7014e541eef8d9e46f9a5835fe7daf9b58a5aeecbebb2d168498608

Contents?: true

Size: 635 Bytes

Versions: 58

Compression:

Stored size: 635 Bytes

Contents

module ForemanInventoryUpload
  class CloudStatusController < ::ApplicationController
    def index
      organizations = User.current.my_organizations

      ping_service = ForemanRhCloud::CloudPingService.new(organizations, logger)
      ping_result = ping_service.ping
      ping_result[:cert_auth] =  ping_result[:cert_auth].map do |org, status_hash|
        status_hash.merge(
          {
            org_id: org.id,
            org_name: org.name,
          }
        )
      end

      render json: {
        ping: ping_result,
      }, status: :ok
    end

    def logger
      Foreman::Logging.logger('app')
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
foreman_rh_cloud-9.0.59 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-11.0.2 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-11.0.1 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-11.0.0 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.58 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-10.0.2 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.57 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-10.0.1 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.56 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.55 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.54 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.53 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.52 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-8.0.52 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-9.0.51 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-8.0.51 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-7.0.48 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-7.0.47 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-8.0.50 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-8.0.49 app/controllers/foreman_inventory_upload/cloud_status_controller.rb