Class: RedhatAccess::TelemetryConfigurationsController
Instance Method Summary
collapse
#can_mask_rules, #can_unregister_system, #current_organization_object, #disconnected_org?, #get_basic_auth_options, #get_branch_id_for_org, #get_branch_id_for_uuid, #get_content_host, #get_content_hosts, #get_default_ssl_ca_file, #get_http_options, #get_http_user_agent, #get_leaf_id, #get_mutual_tls_auth_options, #get_organization, #get_plugin_parent_name, #get_plugin_parent_version, #get_portal_http_proxy, #get_rha_plugin_name, #get_rha_plugin_rpm_name, #get_rha_plugin_version, #get_ssl_options_for_org, #get_ssl_options_for_uuid, #get_tapi_timeout, #get_telemetry_config, #get_upload_timeout, #insights_api_host, #is_org_selected?, #is_susbcribed_to_redhat?, #telemetry_enabled?, #telemetry_enabled_for_uuid?, #upstream_owner, #use_basic_auth?, #use_subsets?, #user_login_to_hash
Instance Method Details
#show ⇒ Object
6
7
8
9
10
|
# File 'app/controllers/redhat_access/telemetry_configurations_controller.rb', line 6
def show
conf = get_telemetry_config(Organization.current)
render json: conf.to_json(:except => [ :id, :created_at, :portal_password ,:updated_at])
end
|
#update ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/controllers/redhat_access/telemetry_configurations_controller.rb', line 12
def update
conf = get_telemetry_config(Organization.current)
if conf
begin
if conf.update_attributes(telemetry_configuration_params)
render json: {:message => "config updated"}
else
render json: {:error=>"Invalid parameters"}.to_json, status: 400
end
rescue => e
Rails.logger.info(e)
render json: {:error=>"Error processing update"}.to_json, status: 500
end
else
render json: {:error=>"Configurationnotfound"}.to_json, status: 404
end
end
|