foreman_rh_cloud 6.0.43 → 7.0.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +11 -5
- data/app/helpers/foreman_inventory_upload_host_helper.rb +1 -3
- data/app/models/concerns/rh_cloud_host.rb +10 -0
- data/config/package-lock.json.plugin +9880 -6929
- data/db/migrate/20221102110254_fix_rh_cloud_settings_category_to_dsl.rb +7 -0
- data/lib/foreman_inventory_upload/async/delayed_start.rb +51 -0
- data/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +12 -9
- data/lib/foreman_inventory_upload/async/shell_process.rb +9 -1
- data/lib/foreman_inventory_upload/async/upload_report_job.rb +3 -1
- data/lib/foreman_rh_cloud/async/exponential_backoff.rb +55 -0
- data/lib/foreman_rh_cloud/engine.rb +8 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/foreman_rh_cloud.rb +4 -0
- data/lib/insights_cloud/async/insights_full_sync.rb +3 -1
- data/lib/insights_cloud/async/insights_resolutions_sync.rb +3 -1
- data/lib/insights_cloud/async/insights_rules_sync.rb +3 -1
- data/lib/insights_cloud/async/insights_scheduled_sync.rb +4 -1
- data/lib/inventory_sync/async/host_result.rb +1 -1
- data/lib/inventory_sync/async/inventory_scheduled_sync.rb +5 -2
- data/lib/inventory_sync/async/query_inventory_job.rb +4 -1
- data/package.json +6 -6
- data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +11 -0
- data/test/jobs/exponential_backoff_test.rb +45 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +1 -2
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -5
- data/webpack/ForemanRhCloudFills.js +1 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +4 -1
- data/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js +4 -1
- data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +4 -3
- metadata +8 -4
- data/app/overrides/hosts_list.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ccb21d6d17487bea0ab663a295419706f007207d62c41fc7e0fce30071fdbd0
|
4
|
+
data.tar.gz: 7f45fd6cb0dfaca6ecd7d0a8a59488aebc91ef9a773056774c062da4623443d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f4a974b345a78cfb4071f6648effb5715e7dcd44fe8e0a0dd2a634a03db788a8b7f819bd785974ad378c3b1a8cb01ee1c58a428753335d732da7b2e3192c9a6
|
7
|
+
data.tar.gz: e3319409f79b9de5eb04fe8bfd07b0efa99d4065bf2a41ef78cfb7db8d210bdbdb0a030c1b3feb406d9ba41627343c5afe2a8f301f22467bfb7eb15fba3c454d
|
@@ -33,10 +33,6 @@ module InsightsCloud::Api
|
|
33
33
|
}, status: @cloud_response.code
|
34
34
|
end
|
35
35
|
|
36
|
-
if @cloud_response.headers[:content_disposition]
|
37
|
-
return send_data @cloud_response, disposition: @cloud_response.headers[:content_disposition], type: @cloud_response.headers[:content_type]
|
38
|
-
end
|
39
|
-
|
40
36
|
# Append redhat-specific headers
|
41
37
|
@cloud_response.headers.each do |key, value|
|
42
38
|
assign_header(response, @cloud_response, key, false) if key.to_s.start_with?('x_rh_')
|
@@ -45,7 +41,17 @@ module InsightsCloud::Api
|
|
45
41
|
assign_header(response, @cloud_response, :x_resource_count, true)
|
46
42
|
headers[Rack::ETAG] = @cloud_response.headers[:etag]
|
47
43
|
|
48
|
-
|
44
|
+
if @cloud_response.headers[:content_disposition]
|
45
|
+
# If there is a Content-Disposition header, it means we are forwarding binary data, send the raw data with proper
|
46
|
+
# content type
|
47
|
+
send_data @cloud_response, disposition: @cloud_response.headers[:content_disposition], type: @cloud_response.headers[:content_type]
|
48
|
+
elsif @cloud_response.headers[:content_type] =~ /zip/
|
49
|
+
# if there is no Content-Disposition, but the content type is binary according the content type,
|
50
|
+
# forward the request as binry too
|
51
|
+
send_data @cloud_response, type: @cloud_response.headers[:content_type]
|
52
|
+
else
|
53
|
+
render json: @cloud_response, status: @cloud_response.code
|
54
|
+
end
|
49
55
|
end
|
50
56
|
|
51
57
|
def branch_info
|
@@ -6,8 +6,6 @@ module ForemanInventoryUploadHostHelper
|
|
6
6
|
def hits_counts_cell(host)
|
7
7
|
host_hits = hits_counts[host.id]
|
8
8
|
host_link = Setting['host_details_ui'] ? "#{host_details_page_path(host)}#/Insights" : "#{host_path(host)}#insights"
|
9
|
-
|
10
|
-
link_to(host_hits, host_link) if host_hits
|
11
|
-
end
|
9
|
+
link_to(host_hits, host_link) if host_hits
|
12
10
|
end
|
13
11
|
end
|
@@ -11,5 +11,15 @@ module RhCloudHost
|
|
11
11
|
|
12
12
|
has_many :insights_hits, through: :insights, source: :hits
|
13
13
|
scoped_search :relation => :insights, :on => :hits_count, :only_explicit => true, :rename => :insights_recommendations_count
|
14
|
+
|
15
|
+
has_one :insights_client_report_status_object, :class_name => '::InsightsClientReportStatus', :foreign_key => 'host_id'
|
16
|
+
scoped_search :relation => :insights_client_report_status_object, :on => :status, :rename => :insights_client_report_status,
|
17
|
+
:complete_value => { :reporting => ::InsightsClientReportStatus::REPORTING,
|
18
|
+
:no_report => ::InsightsClientReportStatus::NO_REPORT }
|
19
|
+
|
20
|
+
has_one :inventory_sync_status_object, :class_name => '::InventorySync::InventoryStatus', :foreign_key => 'host_id'
|
21
|
+
scoped_search :relation => :inventory_sync_status_object, :on => :status, :rename => :insights_inventory_sync_status,
|
22
|
+
:complete_value => { :disconnect => ::InventorySync::InventoryStatus::DISCONNECT,
|
23
|
+
:sync => ::InventorySync::InventoryStatus::SYNC }
|
14
24
|
end
|
15
25
|
end
|