foreman_rh_cloud 5.0.29 → 5.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/foreman_inventory_upload_host_helper.rb +2 -1
  3. data/app/services/foreman_rh_cloud/cloud_ping_service.rb +4 -1
  4. data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +1 -1
  5. data/config/Gemfile.lock.gh_test +204 -168
  6. data/config/package-lock.json +41822 -0
  7. data/config/package-lock.json.gh_test +14336 -7973
  8. data/config/routes.rb +1 -1
  9. data/lib/foreman_inventory_upload/generators/fact_helpers.rb +3 -1
  10. data/lib/foreman_inventory_upload/generators/tags.rb +8 -1
  11. data/lib/foreman_rh_cloud/engine.rb +10 -1
  12. data/lib/foreman_rh_cloud/version.rb +1 -1
  13. data/lib/foreman_rh_cloud.rb +7 -1
  14. data/package.json +1 -1
  15. data/test/controllers/inventory_upload/cloud_status_controller_test.rb +2 -0
  16. data/test/unit/fact_helpers_test.rb +2 -2
  17. data/test/unit/foreman_rh_cloud_self_host_test.rb +7 -0
  18. data/test/unit/rh_cloud_permissions_test.rb +14 -0
  19. data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +19 -0
  20. data/test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb +4 -0
  21. data/test/unit/tags_generator_test.rb +15 -0
  22. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListActions.js +1 -1
  23. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +3 -3
  24. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/index.js +0 -2
  25. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +1 -1
  26. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js +1 -1
  27. data/webpack/ForemanRhCloudFills.js +8 -1
  28. data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsActions.js +1 -1
  29. data/webpack/InsightsHostDetailsTab/InsightsTabActions.js +1 -1
  30. data/webpack/InsightsHostDetailsTab/InsightsTabConstants.js +75 -0
  31. data/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js +147 -0
  32. data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +0 -1
  33. data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
  34. data/webpack/__mocks__/foremanReact/{redux/actions/toasts.js → components/ToastsList/index.js} +0 -0
  35. data/webpack/common/ForemanTasks/ForemanTasksActions.js +1 -1
  36. metadata +7 -4
  37. data/webpack/__mocks__/foremanReact/components/Layout/LayoutSelectors.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a77b9dd6b10d3bf354a1ea4888ac4c829a66de66da4f432860e76ffe1b2a887
4
- data.tar.gz: 81913ea4f9745d2c2e08d2c6b5117395c3b360b1879acdd21c8b83fabeccb4a0
3
+ metadata.gz: 5991354b7fcd361491a962af732a7543402245af2516964876fee68b1bfd6e07
4
+ data.tar.gz: 6232fd7c367092e0afb3591c313f3347c751610fa2a3b4d38e2f59de08cd2313
5
5
  SHA512:
6
- metadata.gz: 026bf10d2031f225aa64539059ed9fea96254a04e4dfb305db0ffc3ca7c0c3c9676b5d331a78cdf98320c3175765a1d862e7be707f4f69ef0f95a8149977119f
7
- data.tar.gz: c8b159a4c8f86bfcf710094b3b6e49b06b00d0d8448f8d853ee0777bf356cd6a3165c497b98f9bba3106f1c1ac234f49f297ff3cf58b548fcb2d462c04eb4f33
6
+ metadata.gz: d38647081b45704673ed8c77b51ade6e90ee8955bf5bd8433bdca9f3072667d505b314ece193e1dd488af51c8cdf6396de5d987acb718693e6c0cecd7e1c7a18
7
+ data.tar.gz: 2622868402ef0d3a0fa55d74652e1985b97c95b1dd42bab865e86dd8b68929e95ebd5dd1bc3bba8fb9fef2fa8d7e4af23b9f00c959d5aca8eb4d4ee180722fb6
@@ -5,8 +5,9 @@ module ForemanInventoryUploadHostHelper
5
5
 
6
6
  def hits_counts_cell(host)
7
7
  host_hits = hits_counts[host.id]
8
+ host_link = Setting['host_details_ui'] ? "#{host_details_page_path(host)}#/Insights" : "#{host_path(host)}#insights"
8
9
  tag.td class: ['hidden-xs', 'ellipsis', 'text-center'] do
9
- link_to(host_hits, "#{host_path(host)}#insights") if host_hits
10
+ link_to(host_hits, host_link) if host_hits
10
11
  end
11
12
  end
12
13
  end
@@ -39,6 +39,9 @@ module ForemanRhCloud
39
39
  certs = candlepin_id_cert(@org)
40
40
  return StandardError.new('certificate missing') unless certs
41
41
 
42
+ cert_checker = Katello::UpstreamConnectionChecker.new(@org)
43
+ cert_checker.assert_connection
44
+
42
45
  execute_cloud_request(
43
46
  method: :get,
44
47
  url: ForemanRhCloud.cert_base_url + "/api/apicast-tests/ping",
@@ -72,7 +75,7 @@ module ForemanRhCloud
72
75
  org,
73
76
  {
74
77
  success: cert_response.is_a?(RestClient::Response),
75
- error: (cert_response.is_a?(Exception) ? cert_response.inspect : nil),
78
+ error: (cert_response.is_a?(Exception) ? cert_response&.message || cert_response.inspect : nil),
76
79
  },
77
80
  ]
78
81
  end
@@ -28,7 +28,7 @@ module ForemanRhCloud
28
28
  headers: {
29
29
  params: forward_params,
30
30
  user_agent: http_user_agent(original_request),
31
- content_type: original_request.media_type,
31
+ content_type: original_request.media_type.presence || original_request.format.to_s,
32
32
  },
33
33
  }
34
34
  base_params.merge(path_params(original_request.path, certs))