foreman_rh_cloud 4.0.25.1 → 4.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/rh_cloud/inventory_controller.rb +4 -1
- data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +8 -0
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +14 -2
- data/config/Gemfile.lock.gh_test +169 -152
- data/config/database.yml.example +2 -2
- data/config/package-lock.json +41822 -0
- data/config/routes.rb +1 -1
- data/lib/foreman_inventory_upload/generators/queries.rb +1 -0
- data/lib/foreman_inventory_upload/generators/tags.rb +9 -3
- data/lib/foreman_rh_cloud/engine.rb +2 -0
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/foreman_rh_cloud.rb +12 -1
- data/lib/insights_cloud/async/insights_client_status_aging.rb +4 -0
- data/lib/insights_cloud/async/insights_full_sync.rb +4 -0
- data/lib/insights_cloud/async/insights_generate_notifications.rb +4 -0
- data/lib/insights_cloud/async/insights_resolutions_sync.rb +7 -2
- data/lib/insights_cloud/async/insights_rules_sync.rb +10 -2
- data/lib/inventory_sync/async/host_result.rb +0 -5
- data/lib/inventory_sync/async/inventory_full_sync.rb +18 -9
- data/lib/inventory_sync/async/inventory_hosts_sync.rb +6 -6
- data/lib/inventory_sync/async/inventory_scheduled_sync.rb +4 -0
- data/lib/inventory_sync/async/inventory_self_host_sync.rb +4 -0
- data/lib/inventory_sync/async/query_inventory_job.rb +4 -0
- data/package.json +2 -2
- data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +16 -39
- data/test/factories/inventory_upload_factories.rb +14 -0
- data/test/jobs/insights_resolutions_sync_test.rb +10 -1
- data/test/jobs/inventory_full_sync_test.rb +28 -2
- data/test/jobs/inventory_hosts_sync_test.rb +15 -0
- data/test/unit/foreman_rh_cloud_self_host_test.rb +28 -0
- data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +26 -0
- data/test/unit/slice_generator_test.rb +36 -4
- data/test/unit/tags_generator_test.rb +31 -16
- data/webpack/InsightsCloudSync/Components/InsightsHeader/index.js +0 -2
- data/webpack/InsightsCloudSync/Components/InsightsSettings/insightsSettings.scss +1 -0
- data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/InsightsHeader.test.js.snap +0 -1
- data/webpack/InsightsCloudSync/InsightsCloudSync.js +2 -0
- data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +1 -0
- data/webpack/common/Switcher/HelpLabel.js +1 -1
- data/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap +1 -1
- metadata +6 -3
@@ -65,14 +65,14 @@ class TagsGeneratorTest < ActiveSupport::TestCase
|
|
65
65
|
test 'generates parameter tags' do
|
66
66
|
FactoryBot.create(:setting, :name => 'include_parameter_tags', :settings_type => "boolean", :category => "Setting::RhCloud", :default => false, :value => true)
|
67
67
|
|
68
|
-
@host.stubs(:
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
68
|
+
@host.stubs(:host_params).returns(
|
69
|
+
{
|
70
|
+
'bool_param' => true,
|
71
|
+
'false_param' => false,
|
72
|
+
'int_param' => 1,
|
73
|
+
'empty_param' => nil,
|
74
|
+
'empty_str_param' => '',
|
75
|
+
}
|
76
76
|
)
|
77
77
|
|
78
78
|
generator = create_generator
|
@@ -87,14 +87,14 @@ class TagsGeneratorTest < ActiveSupport::TestCase
|
|
87
87
|
test 'skips parameter tags if include_parameter_tags setting is off' do
|
88
88
|
FactoryBot.create(:setting, :name => 'include_parameter_tags', :settings_type => "boolean", :category => "Setting::RhCloud", :default => false, :value => false)
|
89
89
|
|
90
|
-
@host.stubs(:
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
90
|
+
@host.stubs(:host_params).returns(
|
91
|
+
{
|
92
|
+
'bool_param' => true,
|
93
|
+
'false_param' => false,
|
94
|
+
'int_param' => 1,
|
95
|
+
'empty_param' => nil,
|
96
|
+
'empty_str_param' => '',
|
97
|
+
}
|
98
98
|
)
|
99
99
|
|
100
100
|
generator = create_generator
|
@@ -103,6 +103,21 @@ class TagsGeneratorTest < ActiveSupport::TestCase
|
|
103
103
|
assert_equal 0, actual.count
|
104
104
|
end
|
105
105
|
|
106
|
+
test 'truncates parameter tags' do
|
107
|
+
Setting[:include_parameter_tags] = true
|
108
|
+
|
109
|
+
@host.stubs(:host_params).returns(
|
110
|
+
{
|
111
|
+
'str_param' => 'a' * 251,
|
112
|
+
}
|
113
|
+
)
|
114
|
+
|
115
|
+
generator = create_generator
|
116
|
+
actual = Hash[generator.generate_parameters]
|
117
|
+
|
118
|
+
assert_equal 'Original value exceeds 250 characters', actual['str_param']
|
119
|
+
end
|
120
|
+
|
106
121
|
private
|
107
122
|
|
108
123
|
def create_generator
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Text, TextVariants } from '@patternfly/react-core';
|
3
3
|
import { translate as __ } from 'foremanReact/common/I18n';
|
4
|
-
import InsightsSettings from '../InsightsSettings';
|
5
4
|
import './InsightsHeader.scss';
|
6
5
|
|
7
6
|
const InsightsHeader = () => (
|
8
7
|
<div className="insights-header">
|
9
|
-
<InsightsSettings />
|
10
8
|
<Text component={TextVariants.p}>
|
11
9
|
{__(
|
12
10
|
'Insights synchronization process is used to provide Insights recommendations output for hosts managed here.'
|
@@ -12,6 +12,7 @@ import {
|
|
12
12
|
import './InsightsCloudSync.scss';
|
13
13
|
import Pagination from './Components/InsightsTable/Pagination';
|
14
14
|
import ToolbarDropdown from './Components/ToolbarDropdown';
|
15
|
+
import InsightsSettings from './Components/InsightsSettings';
|
15
16
|
|
16
17
|
const InsightsCloudSync = ({
|
17
18
|
syncInsights,
|
@@ -42,6 +43,7 @@ const InsightsCloudSync = ({
|
|
42
43
|
|
43
44
|
return (
|
44
45
|
<div className="rh-cloud-insights">
|
46
|
+
<InsightsSettings />
|
45
47
|
<PageLayout
|
46
48
|
searchable
|
47
49
|
searchProps={INSIGHTS_SEARCH_PROPS}
|
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: 4.0.
|
4
|
+
version: 4.0.30
|
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:
|
11
|
+
date: 2022-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- app/views/layouts/foreman_rh_cloud/application.html.erb
|
175
175
|
- config/Gemfile.lock.gh_test
|
176
176
|
- config/database.yml.example
|
177
|
+
- config/package-lock.json
|
177
178
|
- config/package-lock.json.gh_test
|
178
179
|
- config/package-lock.json.plugin
|
179
180
|
- config/rh_cert-api_chain.pem
|
@@ -255,6 +256,7 @@ files:
|
|
255
256
|
- test/test_plugin_helper.rb
|
256
257
|
- test/unit/archived_report_generator_test.rb
|
257
258
|
- test/unit/fact_helpers_test.rb
|
259
|
+
- test/unit/foreman_rh_cloud_self_host_test.rb
|
258
260
|
- test/unit/insights_facet_test.rb
|
259
261
|
- test/unit/metadata_generator_test.rb
|
260
262
|
- test/unit/rh_cloud_http_proxy_test.rb
|
@@ -657,7 +659,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
657
659
|
- !ruby/object:Gem::Version
|
658
660
|
version: '0'
|
659
661
|
requirements: []
|
660
|
-
rubygems_version: 3.2.
|
662
|
+
rubygems_version: 3.2.22
|
661
663
|
signing_key:
|
662
664
|
specification_version: 4
|
663
665
|
summary: Summary of ForemanRhCloud.
|
@@ -685,6 +687,7 @@ test_files:
|
|
685
687
|
- test/test_plugin_helper.rb
|
686
688
|
- test/unit/archived_report_generator_test.rb
|
687
689
|
- test/unit/fact_helpers_test.rb
|
690
|
+
- test/unit/foreman_rh_cloud_self_host_test.rb
|
688
691
|
- test/unit/insights_facet_test.rb
|
689
692
|
- test/unit/metadata_generator_test.rb
|
690
693
|
- test/unit/rh_cloud_http_proxy_test.rb
|