foreman_rh_cloud 5.0.30 → 5.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +1 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +1 -1
- data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +19 -0
- data/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5de242348c67166e20efabc42ca1c4f1db9728fa456f17b2acdd8943df685e88
|
4
|
+
data.tar.gz: 6077615ad33a58f582e1c0f16e85df6b0c50b58d1956415d90be37bb236b3aee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30c352883db5a9100846d9eb3e0fec08853706129d3ddf7d1faef8e5d825345faa4c11240e3afd61e5d422100a1691fafc7564a43a8e09ecf9849377a0a1a75
|
7
|
+
data.tar.gz: 1aa622b93f13b5a938ae3ab7680967e9f677f0b421358e5c1f3400e77e3f26f8f45f0bac44b2c312793c72705863afb19c2515e982402a517cdac8acd62e057e
|
@@ -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))
|
data/package.json
CHANGED
@@ -133,4 +133,23 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
|
|
133
133
|
assert_equal 'GET', actual[:method]
|
134
134
|
assert_equal params, actual[:headers][:params]
|
135
135
|
end
|
136
|
+
|
137
|
+
test 'should forward content type correctly' do
|
138
|
+
user_agent = { :foo => :bar }
|
139
|
+
params = { :page => 5, :per_page => 42 }
|
140
|
+
ForemanRhCloud::BranchInfo.any_instance.expects(:core_app_name).returns('test_app')
|
141
|
+
ForemanRhCloud::BranchInfo.any_instance.expects(:core_app_version).returns('test_ver')
|
142
|
+
|
143
|
+
req = ActionDispatch::Request.new(
|
144
|
+
'REQUEST_URI' => '/foo/bar',
|
145
|
+
'REQUEST_METHOD' => 'GET',
|
146
|
+
'HTTP_USER_AGENT' => user_agent,
|
147
|
+
'rack.input' => ::Puma::NullIO.new,
|
148
|
+
'action_dispatch.request.query_parameters' => params
|
149
|
+
)
|
150
|
+
|
151
|
+
actual = @forwarder.prepare_request_opts(req, 'TEST PAYLOAD', params, generate_certs_hash)
|
152
|
+
|
153
|
+
assert_match /text\/html/, actual[:headers][:content_type]
|
154
|
+
end
|
136
155
|
end
|
@@ -25,7 +25,7 @@ const InsightsTotalRiskCard = ({ hostDetails: { id } }) => {
|
|
25
25
|
} = useAPI('get', insightsCloudUrl(`hits/${id}`), API_OPTIONS);
|
26
26
|
|
27
27
|
useEffect(() => {
|
28
|
-
if (status
|
28
|
+
if (status === STATUS.RESOLVED) {
|
29
29
|
const risks = getInitialRisks();
|
30
30
|
hits.forEach(({ total_risk: risk }) => {
|
31
31
|
risks[risk].value += 1;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|