foreman_rh_cloud 4.0.36 → 5.0.28

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/inventory_upload/report_actions.rb +1 -1
  3. data/app/controllers/foreman_inventory_upload/reports_controller.rb +1 -1
  4. data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +5 -16
  5. data/app/models/setting/rh_cloud.rb +0 -1
  6. data/app/models/task_output_line.rb +2 -0
  7. data/app/models/task_output_status.rb +2 -0
  8. data/app/services/foreman_rh_cloud/cloud_ping_service.rb +1 -4
  9. data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +5 -16
  10. data/config/package-lock.json.plugin +10551 -7500
  11. data/db/migrate/20211027000001_create_task_output.foreman_rh_cloud.rb +18 -0
  12. data/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +11 -7
  13. data/lib/foreman_inventory_upload/async/generate_report_job.rb +24 -12
  14. data/lib/foreman_inventory_upload/async/progress_output.rb +5 -28
  15. data/lib/foreman_inventory_upload/async/queue_for_upload_job.rb +20 -5
  16. data/lib/foreman_inventory_upload/async/shell_process.rb +17 -4
  17. data/lib/foreman_inventory_upload/async/upload_report_job.rb +22 -13
  18. data/lib/foreman_inventory_upload/generators/fact_helpers.rb +1 -3
  19. data/lib/foreman_inventory_upload/generators/queries.rb +0 -1
  20. data/lib/foreman_inventory_upload/generators/tags.rb +1 -8
  21. data/lib/foreman_rh_cloud/engine.rb +12 -22
  22. data/lib/foreman_rh_cloud/version.rb +1 -1
  23. data/lib/insights_cloud/async/insights_scheduled_sync.rb +11 -7
  24. data/lib/inventory_sync/async/host_result.rb +5 -0
  25. data/lib/inventory_sync/async/inventory_full_sync.rb +9 -14
  26. data/lib/inventory_sync/async/inventory_hosts_sync.rb +6 -2
  27. data/lib/tasks/rh_cloud_inventory.rake +2 -2
  28. data/package.json +7 -12
  29. data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +0 -23
  30. data/test/controllers/inventory_upload/cloud_status_controller_test.rb +0 -2
  31. data/test/jobs/inventory_full_sync_test.rb +2 -28
  32. data/test/jobs/inventory_hosts_sync_test.rb +0 -15
  33. data/test/jobs/upload_report_job_test.rb +5 -3
  34. data/test/unit/fact_helpers_test.rb +2 -2
  35. data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +0 -19
  36. data/test/unit/services/foreman_rh_cloud/cloud_status_service_test.rb +0 -4
  37. data/test/unit/shell_process_job_test.rb +3 -1
  38. data/test/unit/slice_generator_test.rb +0 -12
  39. data/test/unit/tags_generator_test.rb +0 -15
  40. data/webpack/ForemanInventoryUpload/Components/AccountList/accountList.scss +8 -0
  41. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss +17 -4
  42. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +29 -17
  43. data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +58 -47
  44. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +1 -1
  45. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +12 -10
  46. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/__snapshots__/PageDescription.test.js.snap +10 -10
  47. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +1 -1
  48. data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTable.test.js.snap +4 -1
  49. data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/NoTokenEmptyState.test.js.snap +24 -13
  50. data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +1 -1
  51. data/webpack/__mocks__/foremanReact/components/Head.js +11 -0
  52. data/webpack/common/Switcher/__tests__/__snapshots__/SwitcherPF4.test.js.snap +1 -0
  53. metadata +7 -3
@@ -60,29 +60,6 @@ module InsightsCloud::Api
60
60
  assert_equal x_rh_insights_request_id, @response.headers['x_rh_insights_request_id']
61
61
  end
62
62
 
63
- test "should set etag header to response from cloud" do
64
- etag = '12345'
65
- req = RestClient::Request.new(:method => 'GET', :url => 'http://test.theforeman.org', :headers => { "If-None-Match": etag})
66
- net_http_resp = Net::HTTPResponse.new(1.0, 200, "OK")
67
- net_http_resp[Rack::ETAG] = etag
68
- res = RestClient::Response.create(@body, net_http_resp, req)
69
- ::ForemanRhCloud::CloudRequestForwarder.any_instance.stubs(:forward_request).returns(res)
70
-
71
- get :forward_request, params: { "path" => "static/v1/release/insights-core.egg" }
72
- assert_equal etag, @response.headers[Rack::ETAG]
73
- end
74
-
75
- test "should set content type header to response from cloud" do
76
- req = RestClient::Request.new(:method => 'GET', :url => 'http://test.theforeman.org')
77
- net_http_resp = Net::HTTPResponse.new(1.0, 200, "OK")
78
- net_http_resp['Content-Type'] = 'application/zip'
79
- res = RestClient::Response.create(@body, net_http_resp, req)
80
- ::ForemanRhCloud::CloudRequestForwarder.any_instance.stubs(:forward_request).returns(res)
81
-
82
- get :forward_request, params: { "path" => "static/v1/release/insights-core.egg" }
83
- assert_equal net_http_resp['Content-Type'], @response.headers['Content-Type']
84
- end
85
-
86
63
  test "should handle failed authentication to cloud" do
87
64
  net_http_resp = Net::HTTPResponse.new(1.0, 401, "Unauthorized")
88
65
  res = RestClient::Response.create(@body, net_http_resp, @http_req)
@@ -29,8 +29,6 @@ class CloudStatusControllerTest < ActionController::TestCase
29
29
  RestClient::Response.new('TEST RESPONSE ORG 1')
30
30
  )
31
31
 
32
- Katello::UpstreamConnectionChecker.any_instance.expects(:assert_connection).twice.returns(true)
33
-
34
32
  get :index, session: set_session_user
35
33
 
36
34
  assert_response :success
@@ -37,18 +37,6 @@ class InventoryFullSyncTest < ActiveSupport::TestCase
37
37
  @host2.subscription_facet.pools << pool
38
38
  @host2_inventory_id = '4536bf5c-ff03-4154-a8c9-32ff4b40e40c'
39
39
 
40
- # this host would pass our plugin queries, so it could be uploaded to the cloud.
41
- @host3 = FactoryBot.create(
42
- :host,
43
- :with_subscription,
44
- :with_content,
45
- content_view: cv.first,
46
- lifecycle_environment: env,
47
- organization: env.organization
48
- )
49
-
50
- @host3.subscription_facet.pools << pool
51
-
52
40
  ForemanInventoryUpload::Generators::Queries.instance_variable_set(:@fact_names, nil)
53
41
 
54
42
  inventory_json = <<-INVENTORY_JSON
@@ -163,7 +151,7 @@ class InventoryFullSyncTest < ActiveSupport::TestCase
163
151
  {
164
152
  "insights_id": "b533848e-465f-4f1a-9b2b-b71cb2d5239d",
165
153
  "rhel_machine_id": null,
166
- "subscription_manager_id": "#{@host3.subscription_facet.uuid}",
154
+ "subscription_manager_id": "d29bde40-348e-437c-8acf-8fa98320fc1b",
167
155
  "satellite_id": "d29bde40-348e-437c-8acf-8fa98320fc1b",
168
156
  "bios_uuid": "3cd5d972-cfb5-451a-8314-fd2f56629d7c",
169
157
  "ip_addresses": [
@@ -171,7 +159,7 @@ class InventoryFullSyncTest < ActiveSupport::TestCase
171
159
  "fd6e:2298:736e::857",
172
160
  "fd6e:2298:736e:0:2c66:6101:9cc6:2b23"
173
161
  ],
174
- "fqdn": "#{@host3.fqdn}",
162
+ "fqdn": "rhel8-demo.oss-lab.net",
175
163
  "mac_addresses": [
176
164
  "6e:66:a6:fe:fc:07",
177
165
  "00:00:00:00:00:00"
@@ -283,18 +271,4 @@ class InventoryFullSyncTest < ActiveSupport::TestCase
283
271
 
284
272
  ForemanTasks.sync_task(InventorySync::Async::InventoryFullSync, @host1.organization)
285
273
  end
286
-
287
- test 'Should skip hosts that are not returned in query' do
288
- assert_nil InventorySync::InventoryStatus.where(host_id: @host3.id).first
289
-
290
- Setting[:rh_cloud_token] = 'TEST TOKEN'
291
- InventorySync::Async::InventoryFullSync.any_instance.expects(:query_inventory).returns(@inventory)
292
- InventorySync::Async::InventoryFullSync.any_instance.expects(:affected_host_ids).returns([@host1.id, @host2.id])
293
- FactoryBot.create(:fact_value, fact_name: fact_names['virt::uuid'], value: '1234', host: @host2)
294
-
295
- ForemanTasks.sync_task(InventorySync::Async::InventoryFullSync, @host1.organization)
296
- @host2.reload
297
-
298
- assert_nil InventorySync::InventoryStatus.where(host_id: @host3.id).first
299
- end
300
274
  end
@@ -265,19 +265,4 @@ class InventoryHostsSyncTest < ActiveSupport::TestCase
265
265
 
266
266
  assert_equal @host2_inventory_id, @host2.insights.uuid
267
267
  end
268
-
269
- test 'Inventory should sync empty facets list' do
270
- empty_inventory = @inventory.deep_clone
271
- empty_inventory['results'] = []
272
- InventorySync::Async::InventoryHostsSync.any_instance.expects(:query_inventory).returns(empty_inventory)
273
- InventorySync::Async::InventoryHostsSync.any_instance.expects(:plan_self_host_sync)
274
-
275
- assert_nil @host2.insights
276
-
277
- ForemanTasks.sync_task(InventorySync::Async::InventoryHostsSync)
278
-
279
- @host2.reload
280
-
281
- assert_nil @host2.insights
282
- end
283
268
  end
@@ -1,6 +1,8 @@
1
1
  require 'test_plugin_helper'
2
+ require 'foreman_tasks/test_helpers'
2
3
 
3
- class UploadReportJobTest < ActiveJob::TestCase
4
+ class UploadReportJobTest < ActiveSupport::TestCase
5
+ include ForemanTasks::TestHelpers::WithInThreadExecutor
4
6
  include FolderIsolation
5
7
 
6
8
  test 'returns aborted state when disconnected' do
@@ -12,7 +14,7 @@ class UploadReportJobTest < ActiveJob::TestCase
12
14
  )
13
15
  FactoryBot.create(:setting, :name => 'content_disconnected', :value => true)
14
16
 
15
- ForemanInventoryUpload::Async::UploadReportJob.perform_now('', organization.id)
17
+ ForemanTasks.sync_task(ForemanInventoryUpload::Async::UploadReportJob, '', organization.id)
16
18
 
17
19
  label = ForemanInventoryUpload::Async::UploadReportJob.output_label(organization.id)
18
20
  progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
@@ -24,7 +26,7 @@ class UploadReportJobTest < ActiveJob::TestCase
24
26
  organization = FactoryBot.create(:organization)
25
27
  Organization.any_instance.expects(:owner_details).returns(nil)
26
28
 
27
- ForemanInventoryUpload::Async::UploadReportJob.perform_now('', organization.id)
29
+ ForemanTasks.sync_task(ForemanInventoryUpload::Async::UploadReportJob, '', organization.id)
28
30
 
29
31
  label = ForemanInventoryUpload::Async::UploadReportJob.output_label(organization.id)
30
32
  progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
@@ -30,13 +30,13 @@ class FactHelpersTest < ActiveSupport::TestCase
30
30
  test 'obfuscates ips with insights-client data' do
31
31
  host = mock('host')
32
32
  @instance.expects(:fact_value).with(host, 'insights_client::ips').returns(
33
- '[{"obfuscated": "10.230.230.1", "original": "224.0.0.1"}, {"obfuscated": "10.230.230.255", "original": "224.0.0.251"}]'
33
+ '[{"obfuscated": "10.230.230.1", "original": "224.0.0.1"}, {"obfuscated": "10.230.230.2", "original": "224.0.0.251"}]'
34
34
  )
35
35
 
36
36
  actual = @instance.obfuscated_ips(host)
37
37
 
38
38
  assert_equal '10.230.230.1', actual['224.0.0.1']
39
- assert_equal '10.230.231.0', actual['224.0.0.2']
39
+ assert_equal '10.230.230.3', actual['224.0.0.2']
40
40
  end
41
41
 
42
42
  test 'obfuscates ips without insights-client data' do
@@ -133,23 +133,4 @@ 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
155
136
  end
@@ -28,8 +28,6 @@ class CloudStatusServiceTest < ActiveSupport::TestCase
28
28
  RestClient::Response.new('TEST RESPONSE ORG 1')
29
29
  )
30
30
 
31
- Katello::UpstreamConnectionChecker.any_instance.expects(:assert_connection).twice.returns(true)
32
-
33
31
  service = ForemanRhCloud::CloudPingService.new(organizations, nil)
34
32
  actual = service.ping
35
33
 
@@ -57,8 +55,6 @@ class CloudStatusServiceTest < ActiveSupport::TestCase
57
55
  'TEST RESPONSE ORG 0'
58
56
  )
59
57
 
60
- Katello::UpstreamConnectionChecker.any_instance.expects(:assert_connection).returns(true)
61
-
62
58
  service = ForemanRhCloud::CloudPingService.new(organizations, nil)
63
59
  actual = service.ping
64
60
 
@@ -1,4 +1,5 @@
1
1
  require 'test_plugin_helper'
2
+ require 'foreman_tasks/test_helpers'
2
3
 
3
4
  class ShellProcessJobTest < ActiveSupport::TestCase
4
5
  class TestProcessJob < ForemanInventoryUpload::Async::ShellProcess
@@ -13,11 +14,12 @@ class ShellProcessJobTest < ActiveSupport::TestCase
13
14
  end
14
15
  end
15
16
 
17
+ include ForemanTasks::TestHelpers::WithInThreadExecutor
16
18
  include FolderIsolation
17
19
 
18
20
  test 'Runs a process with environment vars' do
19
21
  label = Foreman.uuid
20
- TestProcessJob.perform_now(label)
22
+ ForemanTasks.sync_task(TestProcessJob, label)
21
23
 
22
24
  progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
23
25
 
@@ -447,18 +447,6 @@ class SliceGeneratorTest < ActiveSupport::TestCase
447
447
  assert_equal 1, generator.hosts_count
448
448
  end
449
449
 
450
- test 'excludes hosts with host_registration_insights set to false' do
451
- @host.host_parameters << HostParameter.create(
452
- name: 'host_registration_insights',
453
- value: "false",
454
- parameter_type: 'boolean'
455
- )
456
-
457
- count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
458
-
459
- assert_equal 0, count
460
- end
461
-
462
450
  test 'shows system_memory_bytes in bytes' do
463
451
  FactoryBot.create(:fact_value, fact_name: fact_names['memory::memtotal'], value: '1', host: @host)
464
452
 
@@ -103,21 +103,6 @@ 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
-
121
106
  private
122
107
 
123
108
  def create_generator
@@ -1,4 +1,12 @@
1
1
  .rh-cloud-inventory-page {
2
+ #main {
3
+ padding: 0;
4
+
5
+ #breadcrumb {
6
+ display: none;
7
+ }
8
+ }
9
+
2
10
  .account-list {
3
11
  .pf-c-accordion__toggle {
4
12
  margin-top: 10px;
@@ -1,5 +1,21 @@
1
1
  .rh-cloud-inventory-page {
2
2
  .inventory-upload-header {
3
+ margin-top: 35px;
4
+
5
+ h1 {
6
+ font-family: 'RedHatDisplay';
7
+ font-weight: 400;
8
+ margin: 0;
9
+ }
10
+
11
+ p {
12
+ font-size: 16px;
13
+ }
14
+
15
+ .pf-c-dropdown__toggle {
16
+ margin-right: -20px;
17
+ }
18
+
3
19
  .settings-alert {
4
20
  margin-bottom: 30px;
5
21
  .pf-c-alert {
@@ -18,10 +34,7 @@
18
34
 
19
35
  .inventory-upload-header-title {
20
36
  margin-top: -15px;
21
-
22
- h1 {
23
- margin: 0;
24
- }
37
+ margin-bottom: 8px;
25
38
  }
26
39
 
27
40
  .title-dropdown {
@@ -4,7 +4,10 @@ import {
4
4
  DropdownItem,
5
5
  KebabToggle,
6
6
  DropdownPosition,
7
+ Grid,
8
+ GridItem,
7
9
  } from '@patternfly/react-core';
10
+ import Head from 'foremanReact/components/Head';
8
11
  import {
9
12
  INVENTORY_PAGE_TITLE,
10
13
  ACTIONS_HISTORY_BUTTON_TEXT,
@@ -43,23 +46,32 @@ const PageTitle = () => {
43
46
  </DropdownItem>,
44
47
  ];
45
48
  return (
46
- <div className="row form-group inventory-upload-header-title">
47
- <h1 className="col-md-8">{INVENTORY_PAGE_TITLE}</h1>
48
- <Dropdown
49
- className="title-dropdown"
50
- onSelect={() => setIsDropdownOpen(false)}
51
- toggle={<KebabToggle onToggle={isOpen => setIsDropdownOpen(isOpen)} />}
52
- isOpen={isDropdownOpen}
53
- isPlain
54
- dropdownItems={dropdownItems}
55
- position={DropdownPosition.right}
56
- />
57
- <CloudPingModal
58
- isOpen={showPingModal}
59
- toggle={togglePingModal}
60
- title={CLOUD_PING_TITLE}
61
- />
62
- </div>
49
+ <Grid className="inventory-upload-header-title">
50
+ <GridItem span={6}>
51
+ <Head>
52
+ <title>{INVENTORY_PAGE_TITLE}</title>
53
+ </Head>
54
+ <h1>{INVENTORY_PAGE_TITLE}</h1>
55
+ </GridItem>
56
+ <GridItem span={6}>
57
+ <Dropdown
58
+ className="title-dropdown"
59
+ onSelect={() => setIsDropdownOpen(false)}
60
+ toggle={
61
+ <KebabToggle onToggle={isOpen => setIsDropdownOpen(isOpen)} />
62
+ }
63
+ isOpen={isDropdownOpen}
64
+ isPlain
65
+ dropdownItems={dropdownItems}
66
+ position={DropdownPosition.right}
67
+ />
68
+ <CloudPingModal
69
+ isOpen={showPingModal}
70
+ toggle={togglePingModal}
71
+ title={CLOUD_PING_TITLE}
72
+ />
73
+ </GridItem>
74
+ </Grid>
63
75
  );
64
76
  };
65
77
  export default PageTitle;
@@ -1,53 +1,64 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`PageTitle rendering render without Props 1`] = `
4
- <div
5
- className="row form-group inventory-upload-header-title"
4
+ <Grid
5
+ className="inventory-upload-header-title"
6
6
  >
7
- <h1
8
- className="col-md-8"
7
+ <GridItem
8
+ span={6}
9
9
  >
10
- Red Hat Inventory
11
- </h1>
12
- <Dropdown
13
- className="title-dropdown"
14
- dropdownItems={
15
- Array [
16
- <DropdownItem
17
- href="/foreman_tasks/tasks?search=action++%3D++ForemanInventoryUpload%3A%3AAsync%3A%3AGenerateReportJob+or+action++%3D++ForemanInventoryUpload%3A%3AAsync%3A%3AGenerateAllReportsJob&page=1"
18
- rel="noopener noreferrer"
19
- target="_blank"
20
- >
21
- Actions history
22
- </DropdownItem>,
23
- <DropdownItem
24
- href="/links/manual/+?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"
25
- rel="noopener noreferrer"
26
- target="_blank"
27
- >
28
- Documentation
29
- </DropdownItem>,
30
- <DropdownItem
31
- onClick={[Function]}
32
- >
33
- Connectivity test
34
- </DropdownItem>,
35
- ]
36
- }
37
- isOpen={false}
38
- isPlain={true}
39
- onSelect={[Function]}
40
- position="right"
41
- toggle={
42
- <KebabToggle
43
- onToggle={[Function]}
44
- />
45
- }
46
- />
47
- <CloudPingModal
48
- isOpen={false}
49
- title="Connectivity test"
50
- toggle={[Function]}
51
- />
52
- </div>
10
+ <Head>
11
+ <title>
12
+ Red Hat Inventory
13
+ </title>
14
+ </Head>
15
+ <h1>
16
+ Red Hat Inventory
17
+ </h1>
18
+ </GridItem>
19
+ <GridItem
20
+ span={6}
21
+ >
22
+ <Dropdown
23
+ className="title-dropdown"
24
+ dropdownItems={
25
+ Array [
26
+ <DropdownItem
27
+ href="/foreman_tasks/tasks?search=action++%3D++ForemanInventoryUpload%3A%3AAsync%3A%3AGenerateReportJob+or+action++%3D++ForemanInventoryUpload%3A%3AAsync%3A%3AGenerateAllReportsJob&page=1"
28
+ rel="noopener noreferrer"
29
+ target="_blank"
30
+ >
31
+ Actions history
32
+ </DropdownItem>,
33
+ <DropdownItem
34
+ href="/links/manual/+?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"
35
+ rel="noopener noreferrer"
36
+ target="_blank"
37
+ >
38
+ Documentation
39
+ </DropdownItem>,
40
+ <DropdownItem
41
+ onClick={[Function]}
42
+ >
43
+ Connectivity test
44
+ </DropdownItem>,
45
+ ]
46
+ }
47
+ isOpen={false}
48
+ isPlain={true}
49
+ onSelect={[Function]}
50
+ position="right"
51
+ toggle={
52
+ <KebabToggle
53
+ onToggle={[Function]}
54
+ />
55
+ }
56
+ />
57
+ <CloudPingModal
58
+ isOpen={false}
59
+ title="Connectivity test"
60
+ toggle={[Function]}
61
+ />
62
+ </GridItem>
63
+ </Grid>
53
64
  `;
@@ -46,7 +46,7 @@ const CloudPingModal = ({ title, isOpen, toggle }) => {
46
46
  isPending={status === STATUS.PENDING}
47
47
  authStatus={cert}
48
48
  />{' '}
49
- {cert.org_name} {cert.error}
49
+ {cert.org_name}
50
50
  </>
51
51
  ),
52
52
  },
@@ -1,24 +1,26 @@
1
1
  import React from 'react';
2
+ import { Text } from '@patternfly/react-core';
3
+
2
4
  import { translate as __ } from 'foremanReact/common/I18n';
3
5
 
4
6
  export const PageDescription = () => (
5
7
  <div id="inventory_page_description">
6
- <p>
8
+ <Text>
7
9
  {__(
8
10
  'Red Hat Insights is a set of cloud services which provide unified subscription reporting, predictive analysis and remediation of issues through this Satellite instance.'
9
11
  )}
10
- </p>
11
- <p>
12
+ </Text>
13
+ <Text>
12
14
  {__(
13
15
  'You can toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day.'
14
16
  )}
15
- </p>
16
- <p>
17
+ </Text>
18
+ <Text>
17
19
  {__(
18
20
  'Click Restart to upload your host inventory to Red Hat Insights. Perform this step for each organization from which you want to manually upload a host inventory.'
19
21
  )}
20
- </p>
21
- <p>
22
+ </Text>
23
+ <Text>
22
24
  {__(
23
25
  'Enabling inventory uploads is required by subscription watch. For more information about subscription watch see link:'
24
26
  )}
@@ -30,8 +32,8 @@ export const PageDescription = () => (
30
32
  >
31
33
  {__('About subscription watch')}
32
34
  </a>
33
- </p>
34
- <p>
35
+ </Text>
36
+ <Text>
35
37
  {__('For more information about Insights and Cloud Connector read')}
36
38
  &nbsp;
37
39
  <a
@@ -41,7 +43,7 @@ export const PageDescription = () => (
41
43
  >
42
44
  {__('Red Hat Insights Data and Application Security')}
43
45
  </a>
44
- </p>
46
+ </Text>
45
47
  </div>
46
48
  );
47
49
 
@@ -4,16 +4,16 @@ exports[`PageDescription rendering render without Props 1`] = `
4
4
  <div
5
5
  id="inventory_page_description"
6
6
  >
7
- <p>
7
+ <Text>
8
8
  Red Hat Insights is a set of cloud services which provide unified subscription reporting, predictive analysis and remediation of issues through this Satellite instance.
9
- </p>
10
- <p>
9
+ </Text>
10
+ <Text>
11
11
  You can toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day.
12
- </p>
13
- <p>
12
+ </Text>
13
+ <Text>
14
14
  Click Restart to upload your host inventory to Red Hat Insights. Perform this step for each organization from which you want to manually upload a host inventory.
15
- </p>
16
- <p>
15
+ </Text>
16
+ <Text>
17
17
  Enabling inventory uploads is required by subscription watch. For more information about subscription watch see link:
18
18
   
19
19
  <a
@@ -23,8 +23,8 @@ exports[`PageDescription rendering render without Props 1`] = `
23
23
  >
24
24
  About subscription watch
25
25
  </a>
26
- </p>
27
- <p>
26
+ </Text>
27
+ <Text>
28
28
  For more information about Insights and Cloud Connector read
29
29
   
30
30
  <a
@@ -34,6 +34,6 @@ exports[`PageDescription rendering render without Props 1`] = `
34
34
  >
35
35
  Red Hat Insights Data and Application Security
36
36
  </a>
37
- </p>
37
+ </Text>
38
38
  </div>
39
39
  `;
@@ -33,7 +33,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
33
33
  >
34
34
  <Popover
35
35
  bodyContent={
36
- <UNDEFINED
36
+ <Memo(Connect(AdvancedSettings))
37
37
  autoUploadEnabled={true}
38
38
  handleToggle={[Function]}
39
39
  />
@@ -60,7 +60,10 @@ exports[`InsightsTable rendering render with Props 1`] = `
60
60
  dropdownPosition="right"
61
61
  expandId="expandable-toggle"
62
62
  gridBreakPoint="grid-md"
63
+ isHeaderSelectDisabled={false}
64
+ isNested={false}
63
65
  isStickyHeader={false}
66
+ isTreeTable={false}
64
67
  onSelect={[Function]}
65
68
  onSort={[Function]}
66
69
  ouiaSafe={true}
@@ -77,7 +80,7 @@ exports[`InsightsTable rendering render with Props 1`] = `
77
80
  variant="compact"
78
81
  >
79
82
  <TableHeader />
80
- <Component />
83
+ <TableBody />
81
84
  </Table>
82
85
  <TableEmptyState
83
86
  error={null}