Module: RedhatAccess::AnalyticsDashboardHelper

Includes:
Telemetry::LookUps
Defined in:
app/helpers/redhat_access/analytics_dashboard_helper.rb

Instance Method Summary collapse

Methods included from Telemetry::LookUps

#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

#help_path?Boolean

Returns:

  • (Boolean)


5
6
7
8
# File 'app/helpers/redhat_access/analytics_dashboard_helper.rb', line 5

def help_path?
  Rails.logger.info("Helper path ? #{request.path == '/redhat_access/insights/help'}")
  request.path == '/redhat_access/insights/help'
end

#manage_path?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'app/helpers/redhat_access/analytics_dashboard_helper.rb', line 10

def manage_path?
  Rails.logger.info("Manage path ? #{request.path == '/redhat_access/insights/manage'}")
  request.path == '/redhat_access/insights/manage'
end

#view_preconditions_met?Boolean

Returns:

  • (Boolean)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/helpers/redhat_access/analytics_dashboard_helper.rb', line 15

def view_preconditions_met?
  if (help_path?)
    return true
  elsif (!is_org_selected?)
    return false
  elsif !telemetry_enabled?(Organization.current) && !manage_path?
    return false
  elsif !is_susbcribed_to_redhat?(Organization.current)
    return false
  elsif disconnected_org?(Organization.current)
    return false
  else
    return true
  end
end