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-8.0.48 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-8.0.47 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-8.0.46 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-6.0.45 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.46 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.45 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-7.0.46 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.44 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-7.0.45 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-6.0.44 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.43 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-4.0.36 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-6.0.42.2 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-6.0.42.1 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-6.0.43 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.42 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-6.0.42 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.41 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.39 app/controllers/foreman_inventory_upload/cloud_status_controller.rb
foreman_rh_cloud-5.0.38 app/controllers/foreman_inventory_upload/cloud_status_controller.rb