foreman_rh_cloud 11.4.0 → 12.0.0

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/controllers/api/v2/rh_cloud/inventory_controller.rb +2 -2
  3. data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +0 -10
  4. data/config/routes.rb +0 -4
  5. data/lib/foreman_inventory_upload/async/queue_for_upload_job.rb +3 -3
  6. data/lib/foreman_inventory_upload/async/upload_report_job.rb +4 -4
  7. data/lib/foreman_rh_cloud/version.rb +1 -1
  8. data/package.json +5 -5
  9. data/test/controllers/inventory_upload/api/inventory_controller_test.rb +1 -1
  10. data/test/jobs/upload_report_job_test.rb +1 -1
  11. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/__snapshots__/ListItem.test.js.snap +1 -7
  12. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/__snapshots__/ListItemStatus.test.js.snap +1 -5
  13. data/webpack/ForemanInventoryUpload/Components/AccountList/accountList.scss +3 -3
  14. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +1 -1
  15. data/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss +1 -1
  16. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss +5 -5
  17. data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +5 -4
  18. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +18 -3
  19. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +0 -1
  20. data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -1
  21. data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +2 -10
  22. data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +5 -1
  23. data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js +1 -1
  24. data/webpack/InsightsCloudSync/Components/InsightsTable/Pagination.js +7 -7
  25. data/webpack/InsightsCloudSync/Components/InsightsTable/table.scss +1 -1
  26. data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js +5 -1
  27. data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js +8 -1
  28. data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +8 -2
  29. data/webpack/InsightsCloudSync/InsightsCloudSync.scss +1 -1
  30. data/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js +11 -2
  31. data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +5 -4
  32. data/webpack/common/DropdownToggle.js +2 -2
  33. data/webpack/common/Switcher/HelpLabel.js +1 -1
  34. data/webpack/common/Switcher/SwitcherPF4.scss +1 -1
  35. data/webpack/common/Switcher/__tests__/__snapshots__/HelpLabel.test.js.snap +2 -6
  36. data/webpack/common/table/EmptyState.js +25 -18
  37. metadata +2 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dded98b552dea7166e0066c2eb60dfcd9f9c5b1ac4311ded2112c791cfd07eb
4
- data.tar.gz: ff43c40fe389fbdd371b2e5dc63034f7481cfe9802fb56b04d87f0ae4d5ad0a4
3
+ metadata.gz: d3666ab0afa45f6fbf3fbe06ec110cbbf7d7eca432b02686e945afca5b412f31
4
+ data.tar.gz: ce3380aca30486d23d89c3e9b30d17cbc862e51ba55032b1e60565ec63af1cc2
5
5
  SHA512:
6
- metadata.gz: e7af166c1a563dcd8a3e8da3c05b2c884893478fe2f622ba6e03390469c56c2e53cdcbd4463d7fe9a207f66d001971655fcb45bb526216f1eb3bfb2718b64589
7
- data.tar.gz: bfbc64a2087a4e8b349bc2758e6844350a0eab487a6fc4372e43b6c2eb923f7ea0e3200cc3e6c2312b45aa4fb8d66fcd65b668ef50e0adc27bc14131b1e6d50f
6
+ metadata.gz: b853fd7fe75e52c4127984c2644feb55fb455d52d68a86b55ed9d96b84e03d05408fc9ddf5190253d2938965c8583b33903682fabfe137f42ce06f57a2d96a09
7
+ data.tar.gz: fb4777f06aa6d47e0038cc3533b86779a95694c23e4d01b01bc78e10c07196f16df87ead87d4787e8c4dc518813d7ef4e250d8fe955857ebe6811ad5e8b0d3ec
@@ -18,10 +18,10 @@ module Api
18
18
 
19
19
  api :POST, "/organizations/:organization_id/rh_cloud/report", N_("Start report generation")
20
20
  param :organization_id, Integer, required: true, desc: N_("Set the current organization context for the request")
21
- param :disconnected, :bool, required: false, default: false, desc: N_('Generate the report, but do not upload')
21
+ param :no_upload, :bool, required: false, default: false, desc: N_('Generate the report, but do not upload')
22
22
  def generate_report
23
23
  organization_id = params[:organization_id]
24
- disconnected = params[:disconnected] || false
24
+ disconnected = params[:no_upload] || false
25
25
 
26
26
  start_report_generation(organization_id, disconnected)
27
27
 
@@ -63,12 +63,6 @@ module ForemanRhCloud
63
63
 
64
64
  def path_params(request_path, certs)
65
65
  case request_path
66
- when lightspeed?
67
- {
68
- url: ForemanRhCloud.cert_base_url + request_path,
69
- ssl_client_cert: OpenSSL::X509::Certificate.new(certs[:cert]),
70
- ssl_client_key: OpenSSL::PKey.read(certs[:key]),
71
- }
72
66
  when platform_request?
73
67
  {
74
68
  url: ForemanRhCloud.cert_base_url + request_path.sub('/redhat_access/r/insights/platform', '/api'),
@@ -101,10 +95,6 @@ module ForemanRhCloud
101
95
  headers
102
96
  end
103
97
 
104
- def lightspeed?
105
- ->(request_path) { request_path.include? '/lightspeed' }
106
- end
107
-
108
98
  def platform_request?
109
99
  ->(request_path) { request_path.include? '/platform' }
110
100
  end
data/config/routes.rb CHANGED
@@ -49,10 +49,6 @@ Rails.application.routes.draw do
49
49
  end
50
50
  end
51
51
 
52
- scope :module => :'insights_cloud/api' do
53
- match '/api/lightspeed/*path', to: 'machine_telemetries#forward_request', via: :all
54
- end
55
-
56
52
  # API routes
57
53
 
58
54
  namespace :api, :defaults => { :format => 'json' } do
@@ -3,7 +3,7 @@ module ForemanInventoryUpload
3
3
  class QueueForUploadJob < ::Actions::EntryAction
4
4
  def plan(base_folder, report_file, organization_id, disconnected)
5
5
  enqueue_task = plan_self(base_folder: base_folder, report_file: report_file)
6
- plan_upload_report(enqueue_task.output[:enqueued_file_name], organization_id) unless disconnected
6
+ plan_upload_report(enqueue_task.output[:enqueued_file_name], organization_id, disconnected)
7
7
  end
8
8
 
9
9
  def run
@@ -59,8 +59,8 @@ module ForemanInventoryUpload
59
59
  input[:report_file]
60
60
  end
61
61
 
62
- def plan_upload_report(enqueued_file_name, organization_id)
63
- plan_action(UploadReportJob, enqueued_file_name, organization_id)
62
+ def plan_upload_report(enqueued_file_name, organization_id, disconnected)
63
+ plan_action(UploadReportJob, enqueued_file_name, organization_id, disconnected)
64
64
  end
65
65
  end
66
66
  end
@@ -7,15 +7,15 @@ module ForemanInventoryUpload
7
7
  "upload_for_#{label}"
8
8
  end
9
9
 
10
- def plan(filename, organization_id)
10
+ def plan(filename, organization_id, disconnected = false)
11
11
  label = UploadReportJob.output_label(organization_id)
12
- super(label, filename: filename, organization_id: organization_id)
12
+ super(label, filename: filename, organization_id: organization_id, disconnected: disconnected)
13
13
  end
14
14
 
15
15
  def try_execute
16
16
  if content_disconnected?
17
17
  progress_output do |progress_output|
18
- progress_output.write_line('Upload was stopped since disconnected mode setting is enabled for content on this instance.')
18
+ progress_output.write_line('Upload canceled because connection to Insights is not enabled or the --no-upload option was passed.')
19
19
  progress_output.status = "Task aborted, exit 1"
20
20
  done!
21
21
  end
@@ -78,7 +78,7 @@ module ForemanInventoryUpload
78
78
  end
79
79
 
80
80
  def content_disconnected?
81
- !Setting[:subscription_connection_enabled]
81
+ input[:disconnected] || !Setting[:subscription_connection_enabled]
82
82
  end
83
83
  end
84
84
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '11.4.0'.freeze
2
+ VERSION = '12.0.0'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "11.4.0",
3
+ "version": "12.0.0",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,13 +19,13 @@
19
19
  "url": "http://projects.theforeman.org/projects/foreman_rh_cloud/issues"
20
20
  },
21
21
  "peerDependencies": {
22
- "@theforeman/vendor": ">= 10.1.1"
22
+ "@theforeman/vendor": ">= 15.0.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@babel/core": "^7.7.0",
26
- "@theforeman/builder": ">= 10.1.1",
27
- "@theforeman/test": ">= 10.1.1",
28
- "@theforeman/eslint-plugin-foreman": ">= 10.1.1",
26
+ "@theforeman/builder": ">= 15.0.1",
27
+ "@theforeman/test": ">= 15.0.1",
28
+ "@theforeman/eslint-plugin-foreman": ">= 15.0.1",
29
29
  "babel-eslint": "~10.0.0",
30
30
  "eslint": "~6.7.2",
31
31
  "eslint-plugin-spellcheck": "~0.0.17",
@@ -14,7 +14,7 @@ module InventoryUpload::Api
14
14
  .expects(:start_report_generation)
15
15
  .with(@test_org.id.to_s, @disconnected)
16
16
 
17
- post :generate_report, params: { organization_id: @test_org.id, disconnected: @disconnected }
17
+ post :generate_report, params: { organization_id: @test_org.id, no_upload: @disconnected }
18
18
 
19
19
  assert_response :success
20
20
  end
@@ -18,7 +18,7 @@ class UploadReportJobTest < ActiveSupport::TestCase
18
18
 
19
19
  label = ForemanInventoryUpload::Async::UploadReportJob.output_label(organization.id)
20
20
  progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
21
- assert_match(/Upload was stopped/, progress_output.full_output)
21
+ assert_match(/Upload canceled/, progress_output.full_output)
22
22
  assert_match(/exit 1/, progress_output.status)
23
23
  end
24
24
 
@@ -10,13 +10,7 @@ exports[`ListItem rendering render with Props 1`] = `
10
10
  <Label
11
11
  className="account-icon"
12
12
  color="blue"
13
- icon={
14
- <UserIcon
15
- color="currentColor"
16
- noVerticalAlign={false}
17
- size="sm"
18
- />
19
- }
13
+ icon={<UserIcon />}
20
14
  variant="outline"
21
15
  />
22
16
  test
@@ -12,11 +12,7 @@ exports[`ListItemStatus rendering render with Props 1`] = `
12
12
  <p>
13
13
  Generating
14
14
  </p>
15
- <CheckIcon
16
- color="currentColor"
17
- noVerticalAlign={false}
18
- size="sm"
19
- />
15
+ <CheckIcon />
20
16
  </GridItem>
21
17
  <GridItem
22
18
  className="item"
@@ -8,11 +8,11 @@
8
8
  }
9
9
 
10
10
  .account-list {
11
- .pf-c-accordion__toggle {
11
+ .pf-v5-c-accordion__toggle {
12
12
  margin-top: 10px;
13
13
  }
14
14
 
15
- .pf-c-accordion__toggle-text {
15
+ .pf-v5-c-accordion__toggle-text {
16
16
  font-size: 16px;
17
17
  display: flex;
18
18
  justify-content: space-between;
@@ -21,7 +21,7 @@
21
21
  .account-icon {
22
22
  margin-right: 5px;
23
23
 
24
- .pf-c-label__icon {
24
+ .pf-v5-c-label__icon {
25
25
  margin: 0;
26
26
  }
27
27
  }
@@ -29,7 +29,7 @@ const InventoryFilter = ({
29
29
  value={filterTerm}
30
30
  type="text"
31
31
  placeholder={__('Filter..')}
32
- onChange={handleFilterChange}
32
+ onChange={(e, v) => handleFilterChange(v)}
33
33
  />
34
34
  <ClearButton onClear={handleFilterClear} />
35
35
  </FormGroup>
@@ -1,5 +1,5 @@
1
1
  #inventory_filter_form {
2
- .pf-c-form__group-control {
2
+ .pf-v5-c-form__group-control {
3
3
  display: -ms-flexbox;
4
4
  display: -webkit-flex;
5
5
  display: flex;
@@ -12,18 +12,18 @@
12
12
  font-size: 16px;
13
13
  }
14
14
 
15
- .pf-c-dropdown__toggle {
15
+ .pf-v5-c-dropdown__toggle {
16
16
  margin-right: -20px;
17
17
  }
18
18
 
19
19
  .settings-alert {
20
20
  margin-bottom: 30px;
21
- .pf-c-alert {
21
+ .pf-v5-c-alert {
22
22
  margin-bottom: 5px;
23
23
 
24
- .pf-c-alert__title {
25
- font-size: var(--pf-global--FontSize--md);
26
- line-height: var(--pf-global--LineHeight--md);
24
+ .pf-v5-c-alert__title {
25
+ font-size: var(--pf-v5-global--FontSize--md);
26
+ line-height: var(--pf-v5-global--LineHeight--md);
27
27
  }
28
28
  }
29
29
  }
@@ -1,12 +1,11 @@
1
1
  import React, { useState } from 'react';
2
+ import { Grid, GridItem } from '@patternfly/react-core';
2
3
  import {
3
4
  Dropdown,
4
5
  DropdownItem,
5
6
  KebabToggle,
6
7
  DropdownPosition,
7
- Grid,
8
- GridItem,
9
- } from '@patternfly/react-core';
8
+ } from '@patternfly/react-core/deprecated';
10
9
  import Head from 'foremanReact/components/Head';
11
10
  import {
12
11
  INVENTORY_PAGE_TITLE,
@@ -58,7 +57,9 @@ const PageTitle = () => {
58
57
  className="title-dropdown"
59
58
  onSelect={() => setIsDropdownOpen(false)}
60
59
  toggle={
61
- <KebabToggle onToggle={isOpen => setIsDropdownOpen(isOpen)} />
60
+ <KebabToggle
61
+ onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)}
62
+ />
62
63
  }
63
64
  isOpen={isDropdownOpen}
64
65
  isPlain
@@ -2,7 +2,11 @@
2
2
  import React, { useCallback, useEffect, useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { useDispatch, useSelector } from 'react-redux';
5
- import { Table, TableBody, TableHeader } from '@patternfly/react-table';
5
+ import {
6
+ Table,
7
+ TableBody,
8
+ TableHeader,
9
+ } from '@patternfly/react-table/deprecated';
6
10
  import {
7
11
  Card,
8
12
  CardTitle,
@@ -11,6 +15,7 @@ import {
11
15
  ModalVariant,
12
16
  Spinner,
13
17
  Text,
18
+ Icon,
14
19
  } from '@patternfly/react-core';
15
20
  import {
16
21
  CheckCircleIcon,
@@ -108,8 +113,18 @@ const CloudPingModal = ({ title, isOpen, toggle }) => {
108
113
 
109
114
  const StatusIcon = ({ isPending, authStatus }) => {
110
115
  if (isPending) return <Spinner size="sm" />;
111
- if (authStatus.success) return <CheckCircleIcon color="green" />;
112
- if (authStatus.error) return <ExclamationCircleIcon color="red" />;
116
+ if (authStatus.success)
117
+ return (
118
+ <Icon color="green">
119
+ <CheckCircleIcon />
120
+ </Icon>
121
+ );
122
+ if (authStatus.error)
123
+ return (
124
+ <Icon color="red">
125
+ <ExclamationCircleIcon />
126
+ </Icon>
127
+ );
113
128
  return <Spinner size="sm" />;
114
129
  };
115
130
 
@@ -22,7 +22,6 @@ class SyncButton extends React.Component {
22
22
  <Button
23
23
  className="sync_button"
24
24
  onClick={handleClick}
25
- size="lg"
26
25
  isDisabled={status === STATUS.PENDING}
27
26
  variant="secondary"
28
27
  >
@@ -6,7 +6,6 @@ exports[`SyncButton rendering render with Props 1`] = `
6
6
  className="sync_button"
7
7
  isDisabled={false}
8
8
  onClick={[Function]}
9
- size="lg"
10
9
  variant="secondary"
11
10
  >
12
11
  Sync all inventory status
@@ -56,11 +56,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
56
56
  >
57
57
  Show Advanced Settings
58
58
 
59
- <CaretRightIcon
60
- color="currentColor"
61
- noVerticalAlign={false}
62
- size="sm"
63
- />
59
+ <CaretRightIcon />
64
60
  </Button>
65
61
  </Popover>
66
62
  </Col>
@@ -78,11 +74,7 @@ exports[`InventoryAutoUpload rendering render with props 1`] = `
78
74
  <Text
79
75
  component="p"
80
76
  >
81
- <InfoAltIcon
82
- color="currentColor"
83
- noVerticalAlign={false}
84
- size="sm"
85
- />
77
+ <InfoAltIcon />
86
78
 
87
79
  More details can be found in
88
80
 
@@ -1,7 +1,11 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  import React, { useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { Table, TableHeader, TableBody } from '@patternfly/react-table';
4
+ import {
5
+ Table,
6
+ TableHeader,
7
+ TableBody,
8
+ } from '@patternfly/react-table/deprecated';
5
9
  import { useForemanSettings } from 'foremanReact/Root/Context/ForemanContext';
6
10
  import SelectAllAlert from './SelectAllAlert';
7
11
  import {
@@ -4,7 +4,7 @@ import {
4
4
  InsightsLabel,
5
5
  Section,
6
6
  } from '@redhat-cloud-services/frontend-components';
7
- import { DropdownItem } from '@patternfly/react-core';
7
+ import { DropdownItem } from '@patternfly/react-core/deprecated';
8
8
  import { sortable, cellWidth } from '@patternfly/react-table';
9
9
  import { AnsibeTowerIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
10
10
  import { translate as __ } from 'foremanReact/common/I18n';
@@ -20,13 +20,13 @@ const paginationTitles = {
20
20
  page: '', // doesn't work well with translations as it adds 's' for plural, see: https://github.com/patternfly/patternfly-react/issues/6707
21
21
  itemsPerPage: __('Items per page'),
22
22
  perPageSuffix: __('per page'),
23
- toFirstPage: __('Go to first page'),
24
- toPreviousPage: __('Go to previous page'),
25
- toLastPage: __('Go to last page'),
26
- toNextPage: __('Go to next page'),
27
- optionsToggle: __('Items per page'),
28
- currPage: __('Current page'),
29
- paginationTitle: __('Pagination'),
23
+ toFirstPageAriaLabel: __('Go to first page'),
24
+ toPreviousPageAriaLabel: __('Go to previous page'),
25
+ toLastPageAriaLabel: __('Go to last page'),
26
+ toNextPageAriaLabel: __('Go to next page'),
27
+ optionsToggleAriaLabel: __('Items per page'),
28
+ currPageAriaLabel: __('Current page'),
29
+ paginationAriaLabel: __('Pagination'),
30
30
  };
31
31
 
32
32
  const Pagination = ({ variant, ...props }) => {
@@ -1,5 +1,5 @@
1
1
  .rh-cloud-recommendations-table {
2
- .pf-c-table__check {
2
+ .pf-v5-c-table__check {
3
3
  input:disabled {
4
4
  display: none;
5
5
  }
@@ -1,7 +1,11 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  import React, { useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { Table, TableHeader, TableBody } from '@patternfly/react-table';
4
+ import {
5
+ Table,
6
+ TableHeader,
7
+ TableBody,
8
+ } from '@patternfly/react-table/deprecated';
5
9
  import { Modal, ModalVariant, Button } from '@patternfly/react-core';
6
10
  import { isEmpty } from 'lodash';
7
11
  import { STATUS } from 'foremanReact/constants';
@@ -1,11 +1,18 @@
1
1
  import React from 'react';
2
2
  import { cellWidth } from '@patternfly/react-table';
3
+ import { Icon } from '@patternfly/react-core';
3
4
  import { CheckCircleIcon } from '@patternfly/react-icons';
4
5
  import { translate as __ } from 'foremanReact/common/I18n';
5
6
  import { foremanUrl } from '../../../ForemanRhCloudHelpers';
6
7
 
7
8
  export const rebootFormatter = ({ title: reboot }) => ({
8
- children: reboot ? <CheckCircleIcon color="green" /> : __('No'),
9
+ children: reboot ? (
10
+ <Icon color="green">
11
+ <CheckCircleIcon />
12
+ </Icon>
13
+ ) : (
14
+ __('No')
15
+ ),
9
16
  });
10
17
 
11
18
  export const columns = [
@@ -1,7 +1,11 @@
1
1
  import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { translate as __ } from 'foremanReact/common/I18n';
4
- import { Dropdown, DropdownItem, KebabToggle } from '@patternfly/react-core';
4
+ import {
5
+ Dropdown,
6
+ DropdownItem,
7
+ KebabToggle,
8
+ } from '@patternfly/react-core/deprecated';
5
9
  import { ExternalLinkAltIcon } from '@patternfly/react-icons';
6
10
  import { redHatAdvisorSystems } from '../InsightsCloudSyncHelpers';
7
11
  import { useAdvisorEngineConfig } from '../../common/Hooks/ConfigHooks';
@@ -35,7 +39,9 @@ const ToolbarDropdown = ({ onRecommendationSync }) => {
35
39
  <Dropdown
36
40
  className="title-dropdown"
37
41
  onSelect={() => setIsDropdownOpen(false)}
38
- toggle={<KebabToggle onToggle={isOpen => setIsDropdownOpen(isOpen)} />}
42
+ toggle={
43
+ <KebabToggle onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)} />
44
+ }
39
45
  isOpen={isDropdownOpen}
40
46
  isPlain
41
47
  dropdownItems={dropdownItems}
@@ -78,7 +78,7 @@
78
78
  width: 100%;
79
79
  }
80
80
 
81
- .pf-c-pagination {
81
+ .pf-v5-c-pagination {
82
82
  padding-right: 0;
83
83
  }
84
84
  }
@@ -3,8 +3,14 @@ import PropTypes from 'prop-types';
3
3
  import { useDispatch } from 'react-redux';
4
4
  import { push } from 'connected-react-router';
5
5
  import { useHistory } from 'react-router-dom';
6
- import { DropdownItem, Bullseye, Title } from '@patternfly/react-core';
7
- import { ChartDonut, ChartLegend, ChartLabel } from '@patternfly/react-charts';
6
+ import { Bullseye, Title } from '@patternfly/react-core';
7
+ import { DropdownItem } from '@patternfly/react-core/deprecated';
8
+ import {
9
+ ChartDonut,
10
+ ChartLegend,
11
+ ChartLabel,
12
+ ChartTooltip,
13
+ } from '@patternfly/react-charts';
8
14
  import { STATUS } from 'foremanReact/constants';
9
15
  import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
10
16
  import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate';
@@ -90,6 +96,9 @@ const InsightsTotalRiskCard = ({ hostDetails: { id } }) => {
90
96
  { x: critical.title, y: critical.value },
91
97
  ]}
92
98
  labels={({ datum: { x, y } }) => `${x}: ${y}`}
99
+ labelComponent={
100
+ <ChartTooltip constrainToVisibleArea renderInPortal={false} />
101
+ }
93
102
  legendComponent={legend}
94
103
  legendPosition="right"
95
104
  subTitle="Recommendations"
@@ -3,13 +3,12 @@ import PropTypes from 'prop-types';
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
4
  import SearchBar from 'foremanReact/components/SearchBar';
5
5
  import { translate as __ } from 'foremanReact/common/I18n';
6
+ import { Grid, GridItem } from '@patternfly/react-core';
6
7
  import {
7
- Grid,
8
- GridItem,
9
8
  Dropdown,
10
9
  DropdownItem,
11
10
  KebabToggle,
12
- } from '@patternfly/react-core';
11
+ } from '@patternfly/react-core/deprecated';
13
12
  import { ExternalLinkAltIcon } from '@patternfly/react-icons';
14
13
  import InsightsTable from '../InsightsCloudSync/Components/InsightsTable';
15
14
  import RemediationModal from '../InsightsCloudSync/Components/RemediationModal';
@@ -76,7 +75,9 @@ const NewHostDetailsTab = ({ hostName, router }) => {
76
75
  ouiaId="insights-dropdown"
77
76
  onSelect={() => setIsDropdownOpen(false)}
78
77
  toggle={
79
- <KebabToggle onToggle={isOpen => setIsDropdownOpen(isOpen)} />
78
+ <KebabToggle
79
+ onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)}
80
+ />
80
81
  }
81
82
  isOpen={isDropdownOpen}
82
83
  isPlain
@@ -1,13 +1,13 @@
1
1
  import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Dropdown, KebabToggle } from '@patternfly/react-core';
3
+ import { Dropdown, KebabToggle } from '@patternfly/react-core/deprecated';
4
4
 
5
5
  const DropdownToggle = ({ items, ...props }) => {
6
6
  const [isOpen, setOpen] = useState(false);
7
7
  return (
8
8
  <Dropdown
9
9
  onSelect={() => setOpen(false)}
10
- toggle={<KebabToggle onToggle={value => setOpen(value)} />}
10
+ toggle={<KebabToggle onToggle={(_event, value) => setOpen(value)} />}
11
11
  isOpen={isOpen}
12
12
  isPlain
13
13
  dropdownItems={items}
@@ -9,7 +9,7 @@ export const HelpLabel = ({ text, id, className }) => {
9
9
  <Popover id={`${id}-help`} bodyContent={text} aria-label="help-text">
10
10
  <button
11
11
  onClick={e => e.preventDefault()}
12
- className={`pf-c-form__group-label-help ${className}`}
12
+ className={`pf-v5-c-form__group-label-help ${className}`}
13
13
  >
14
14
  <HelpIcon />
15
15
  </button>
@@ -7,7 +7,7 @@ label.foreman-rh-cloud-switcher {
7
7
  padding-left: 5px;
8
8
  }
9
9
 
10
- .pf-c-switch__toggle {
10
+ .pf-v5-c-switch__toggle {
11
11
  margin-right: 5px;
12
12
  }
13
13
  }
@@ -7,14 +7,10 @@ exports[`InsightsCloudSync helpers should return insights cloud Url 1`] = `
7
7
  id="some-id-help"
8
8
  >
9
9
  <button
10
- className="pf-c-form__group-label-help some-class"
10
+ className="pf-v5-c-form__group-label-help some-class"
11
11
  onClick={[Function]}
12
12
  >
13
- <HelpIcon
14
- color="currentColor"
15
- noVerticalAlign={false}
16
- size="sm"
17
- />
13
+ <HelpIcon />
18
14
  </button>
19
15
  </Popover>
20
16
  `;
@@ -5,7 +5,7 @@ import {
5
5
  EmptyStateIcon,
6
6
  Spinner,
7
7
  EmptyStateVariant,
8
- Title,
8
+ EmptyStateHeader,
9
9
  } from '@patternfly/react-core';
10
10
  import { ExclamationCircleIcon, CheckIcon } from '@patternfly/react-icons';
11
11
 
@@ -16,33 +16,40 @@ const TableEmptyState = ({ status, error, rowsLength }) => {
16
16
  switch (status) {
17
17
  case STATUS.PENDING:
18
18
  return (
19
- <EmptyState variant={EmptyStateVariant.small}>
20
- <EmptyStateIcon variant="container" component={Spinner} />
21
- <Title headingLevel="h2" size="lg">
22
- {__('Loading')}
23
- </Title>
19
+ <EmptyState variant={EmptyStateVariant.sm}>
20
+ <EmptyStateHeader
21
+ titleText={<>{__('Loading')}</>}
22
+ icon={<EmptyStateIcon icon={Spinner} />}
23
+ headingLevel="h2"
24
+ />
24
25
  </EmptyState>
25
26
  );
26
27
  case STATUS.ERROR:
27
28
  return (
28
- <EmptyState variant={EmptyStateVariant.small}>
29
- <EmptyStateIcon
30
- variant="container"
31
- component={ExclamationCircleIcon}
29
+ <EmptyState variant={EmptyStateVariant.sm}>
30
+ <EmptyStateHeader
31
+ titleText={
32
+ <>
33
+ {sprintf(
34
+ __('The server returned the following error: %s'),
35
+ error
36
+ )}
37
+ </>
38
+ }
39
+ icon={<EmptyStateIcon icon={ExclamationCircleIcon} />}
40
+ headingLevel="h2"
32
41
  />
33
- <Title headingLevel="h2" size="lg">
34
- {sprintf(__('The server returned the following error: %s'), error)}
35
- </Title>
36
42
  </EmptyState>
37
43
  );
38
44
  case STATUS.RESOLVED:
39
45
  if (rowsLength > 0) return null;
40
46
  return (
41
- <EmptyState variant={EmptyStateVariant.large}>
42
- <EmptyStateIcon variant="container" component={CheckIcon} />
43
- <Title headingLevel="h2" size="lg">
44
- {__('There are no recommendations for your hosts')}
45
- </Title>
47
+ <EmptyState variant={EmptyStateVariant.lg}>
48
+ <EmptyStateHeader
49
+ titleText={<>{__('There are no recommendations for your hosts')}</>}
50
+ icon={<EmptyStateIcon icon={CheckIcon} />}
51
+ headingLevel="h2"
52
+ />
46
53
  </EmptyState>
47
54
  );
48
55
  default:
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.4.0
4
+ version: 12.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-07 00:00:00.000000000 Z
10
+ date: 2025-04-01 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foreman_ansible
@@ -16,9 +16,6 @@ dependencies:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: 15.0.0
19
- - - "<"
20
- - !ruby/object:Gem::Version
21
- version: 16.0.0
22
19
  type: :runtime
23
20
  prerelease: false
24
21
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,29 +23,6 @@ dependencies:
26
23
  - - ">="
27
24
  - !ruby/object:Gem::Version
28
25
  version: 15.0.0
29
- - - "<"
30
- - !ruby/object:Gem::Version
31
- version: 16.0.0
32
- - !ruby/object:Gem::Dependency
33
- name: foreman_remote_execution
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - ">="
37
- - !ruby/object:Gem::Version
38
- version: 15.0.0
39
- - - "<"
40
- - !ruby/object:Gem::Version
41
- version: 16.0.0
42
- type: :runtime
43
- prerelease: false
44
- version_requirements: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: 15.0.0
49
- - - "<"
50
- - !ruby/object:Gem::Version
51
- version: 16.0.0
52
26
  - !ruby/object:Gem::Dependency
53
27
  name: foreman-tasks
54
28
  requirement: !ruby/object:Gem::Requirement
@@ -56,9 +30,6 @@ dependencies:
56
30
  - - ">="
57
31
  - !ruby/object:Gem::Version
58
32
  version: 10.0.0
59
- - - "<"
60
- - !ruby/object:Gem::Version
61
- version: 11.0.0
62
33
  type: :runtime
63
34
  prerelease: false
64
35
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,9 +37,6 @@ dependencies:
66
37
  - - ">="
67
38
  - !ruby/object:Gem::Version
68
39
  version: 10.0.0
69
- - - "<"
70
- - !ruby/object:Gem::Version
71
- version: 11.0.0
72
40
  - !ruby/object:Gem::Dependency
73
41
  name: katello
74
42
  requirement: !ruby/object:Gem::Requirement