foreman_rh_cloud 8.0.47 → 8.0.48

Sign up to get free protection for your applications and to get access to all the features.
data/config/routes.rb CHANGED
@@ -4,6 +4,7 @@ Rails.application.routes.draw do
4
4
  post ':organization_id/reports', to: 'reports#generate', constraints: { organization_id: %r{[^\/]+} }
5
5
  get ':organization_id/uploads/last', to: 'uploads#last', constraints: { organization_id: %r{[^\/]+} }
6
6
  get ':organization_id/uploads/file', to: 'uploads#download_file', constraints: { organization_id: %r{[^\/]+} }
7
+ get 'missing_hosts', to: 'missing_hosts#index'
7
8
  get 'accounts', to: 'accounts#index'
8
9
  get 'settings', to: 'uploads_settings#index'
9
10
  post 'setting', to: 'uploads_settings#set_advanced_setting'
@@ -50,10 +51,12 @@ Rails.application.routes.draw do
50
51
  scope '(:apiv)', :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
51
52
  resources :organizations, :only => [:show] do
52
53
  namespace 'rh_cloud' do
54
+ get 'missing_hosts', to: 'inventory#get_hosts'
53
55
  get 'report', to: 'inventory#download_file'
54
56
  post 'report', to: 'inventory#generate_report'
55
57
 
56
58
  post 'inventory_sync', to: 'inventory#sync_inventory_status'
59
+ post 'missing_hosts', to: 'inventory#remove_hosts'
57
60
  end
58
61
  end
59
62
 
@@ -3,8 +3,8 @@
3
3
  class AddMissingHostsTable < ActiveRecord::Migration[6.1]
4
4
  def change
5
5
  create_table :insights_missing_hosts do |t|
6
- t.integer :organization_id
7
6
  t.string :name
7
+ t.integer :organization_id
8
8
  t.string :insights_id
9
9
  t.string :rhsm_id
10
10
  t.string :ip_address
@@ -113,7 +113,7 @@ module ForemanInventoryUpload
113
113
  bash_hostname = `uname -n`.chomp
114
114
  foreman_hostname = ForemanRhCloud.foreman_host&.name
115
115
  if bash_hostname == foreman_hostname
116
- fqdn(foreman_hostname)
116
+ fqdn(ForemanRhCloud.foreman_host)
117
117
  elsif Setting[:obfuscate_inventory_hostnames]
118
118
  obfuscate_fqdn(bash_hostname)
119
119
  else
@@ -52,9 +52,10 @@ module ForemanRhCloud
52
52
  :generate_foreman_rh_cloud,
53
53
  'foreman_inventory_upload/reports': [:generate],
54
54
  'foreman_inventory_upload/tasks': [:create],
55
- 'api/v2/rh_cloud/inventory': [:sync_inventory_status, :download_file, :generate_report, :enable_cloud_connector],
55
+ 'api/v2/rh_cloud/inventory': [:get_hosts, :remove_hosts, :sync_inventory_status, :download_file, :generate_report, :enable_cloud_connector],
56
56
  'foreman_inventory_upload/uploads': [:enable_cloud_connector],
57
57
  'foreman_inventory_upload/uploads_settings': [:set_advanced_setting],
58
+ 'foreman_inventory_upload/missing_hosts': [:remove_hosts],
58
59
  'insights_cloud/settings': [:update],
59
60
  'insights_cloud/tasks': [:create]
60
61
  )
@@ -66,6 +67,7 @@ module ForemanRhCloud
66
67
  'foreman_inventory_upload/tasks': [:show],
67
68
  'foreman_inventory_upload/cloud_status': [:index],
68
69
  'foreman_inventory_upload/uploads_settings': [:index],
70
+ 'foreman_inventory_upload/missing_hosts': [:index],
69
71
  'react': [:index]
70
72
  )
71
73
  permission(
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '8.0.47'.freeze
2
+ VERSION = '8.0.48'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "8.0.47",
3
+ "version": "8.0.48",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,10 +9,7 @@
9
9
  "test": "tfm-test --plugin",
10
10
  "test:watch": "tfm-test --plugin --watchAll",
11
11
  "test:current": "tfm-test --plugin --watch",
12
- "publish-coverage": "tfm-publish-coverage",
13
- "stories": "tfm-stories --plugin",
14
- "stories:build": "tfm-build-stories --plugin",
15
- "stories:deploy": "surge --project .storybook-dist"
12
+ "publish-coverage": "tfm-publish-coverage"
16
13
  },
17
14
  "repository": {
18
15
  "type": "git",
@@ -27,7 +24,6 @@
27
24
  "devDependencies": {
28
25
  "@babel/core": "~7.7.0",
29
26
  "@theforeman/builder": ">= 10.1.1",
30
- "@theforeman/stories": ">= 10.1.1",
31
27
  "@theforeman/test": ">= 10.1.1",
32
28
  "@theforeman/eslint-plugin-foreman": ">= 10.1.1",
33
29
  "babel-eslint": "~10.0.0",
@@ -31,7 +31,7 @@ exports[`PageTitle rendering render without Props 1`] = `
31
31
  Actions history
32
32
  </DropdownItem>,
33
33
  <DropdownItem
34
- href="/links/manual/+?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"
34
+ href="/links/manual/?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"
35
35
  rel="noopener noreferrer"
36
36
  target="_blank"
37
37
  >
@@ -2,28 +2,44 @@ import React from 'react';
2
2
  import { Text } from '@patternfly/react-core';
3
3
 
4
4
  import { translate as __ } from 'foremanReact/common/I18n';
5
+ import { FormattedMessage } from 'react-intl';
5
6
 
6
7
  export const PageDescription = () => (
7
8
  <div id="inventory_page_description">
8
9
  <Text>
9
10
  {__(
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.'
11
+ 'The Red Hat Hybrid Cloud Console provides a set of cloud services, including Red Hat Insights and Subscriptions, that provide predictive analysis, remediation of issues, and unified subscription reporting for this Satellite instance.'
11
12
  )}
12
13
  </Text>
13
14
  <Text>
14
15
  {__(
15
- 'You can toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day.'
16
+ 'The Satellite inventory upload plugin automatically uploads Satellite host inventory data to the Inventory service of Insights, where it can also be used by the Subscriptions service for subscription reporting. If you use the Subscriptions service, enabling inventory uploads is required.'
16
17
  )}
17
18
  </Text>
18
19
  <Text>
19
- {__(
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.'
21
- )}
20
+ <FormattedMessage
21
+ id="enable-upload-hint"
22
+ defaultMessage={__(
23
+ 'To enable this reporting for all Satellite organizations, set {uploadButtonName} to on. The data will be reported automatically once per day.'
24
+ )}
25
+ values={{
26
+ uploadButtonName: <strong>{__('Automatic inventory upload')}</strong>,
27
+ }}
28
+ />
22
29
  </Text>
23
30
  <Text>
24
- {__(
25
- 'Enabling inventory uploads is required by subscription watch. For more information about subscription watch see link:'
26
- )}
31
+ <FormattedMessage
32
+ id="restart-button-hint"
33
+ defaultMessage={__(
34
+ 'To manually upload the data for a specific organization, select an organization and click {restartButtonName}.'
35
+ )}
36
+ values={{
37
+ restartButtonName: <strong>{__('Restart')}</strong>,
38
+ }}
39
+ />
40
+ </Text>
41
+ <Text>
42
+ {__('For more information about the Subscriptions service, see:')}
27
43
  &nbsp;
28
44
  <a
29
45
  href="https://access.redhat.com/documentation/en-us/subscription_central/2020-04/html/getting_started_with_subscription_watch/assembly-about-subscriptionwatch"
@@ -34,7 +50,7 @@ export const PageDescription = () => (
34
50
  </a>
35
51
  </Text>
36
52
  <Text>
37
- {__('For more information about Insights and Cloud Connector read')}
53
+ {__('For more information about Insights and Cloud Connector, see:')}
38
54
  &nbsp;
39
55
  <a
40
56
  href="https://console.redhat.com/security/insights/"
@@ -5,16 +5,39 @@ exports[`PageDescription rendering render without Props 1`] = `
5
5
  id="inventory_page_description"
6
6
  >
7
7
  <Text>
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.
8
+ The Red Hat Hybrid Cloud Console provides a set of cloud services, including Red Hat Insights and Subscriptions, that provide predictive analysis, remediation of issues, and unified subscription reporting for this Satellite instance.
9
9
  </Text>
10
10
  <Text>
11
- You can toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day.
11
+ The Satellite inventory upload plugin automatically uploads Satellite host inventory data to the Inventory service of Insights, where it can also be used by the Subscriptions service for subscription reporting. If you use the Subscriptions service, enabling inventory uploads is required.
12
12
  </Text>
13
13
  <Text>
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.
14
+ <FormattedMessage
15
+ defaultMessage="To enable this reporting for all Satellite organizations, set {uploadButtonName} to on. The data will be reported automatically once per day."
16
+ id="enable-upload-hint"
17
+ values={
18
+ Object {
19
+ "uploadButtonName": <strong>
20
+ Automatic inventory upload
21
+ </strong>,
22
+ }
23
+ }
24
+ />
15
25
  </Text>
16
26
  <Text>
17
- Enabling inventory uploads is required by subscription watch. For more information about subscription watch see link:
27
+ <FormattedMessage
28
+ defaultMessage="To manually upload the data for a specific organization, select an organization and click {restartButtonName}."
29
+ id="restart-button-hint"
30
+ values={
31
+ Object {
32
+ "restartButtonName": <strong>
33
+ Restart
34
+ </strong>,
35
+ }
36
+ }
37
+ />
38
+ </Text>
39
+ <Text>
40
+ For more information about the Subscriptions service, see:
18
41
   
19
42
  <a
20
43
  href="https://access.redhat.com/documentation/en-us/subscription_central/2020-04/html/getting_started_with_subscription_watch/assembly-about-subscriptionwatch"
@@ -25,7 +48,7 @@ exports[`PageDescription rendering render without Props 1`] = `
25
48
  </a>
26
49
  </Text>
27
50
  <Text>
28
- For more information about Insights and Cloud Connector read
51
+ For more information about Insights and Cloud Connector, see:
29
52
   
30
53
  <a
31
54
  href="https://console.redhat.com/security/insights/"
@@ -6,7 +6,7 @@ export const inventoryUrl = path =>
6
6
 
7
7
  export const getInventoryDocsUrl = () =>
8
8
  foremanUrl(
9
- `/links/manual/+?root_url=${URI.encode(
9
+ `/links/manual/?root_url=${URI.encode(
10
10
  'https://access.redhat.com/products/subscription-central'
11
11
  )}`
12
12
  );
@@ -2,4 +2,4 @@
2
2
 
3
3
  exports[`ForemanInventoryUpload helpers should return inventory Url 1`] = `"/foreman_inventory_upload/test_path"`;
4
4
 
5
- exports[`ForemanInventoryUpload helpers should return inventory docs url 1`] = `"/links/manual/+?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"`;
5
+ exports[`ForemanInventoryUpload helpers should return inventory docs url 1`] = `"/links/manual/?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"`;
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: 8.0.47
4
+ version: 8.0.48
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: 2023-06-20 00:00:00.000000000 Z
11
+ date: 2023-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello
@@ -126,6 +126,7 @@ files:
126
126
  - app/controllers/concerns/inventory_upload/task_actions.rb
127
127
  - app/controllers/foreman_inventory_upload/accounts_controller.rb
128
128
  - app/controllers/foreman_inventory_upload/cloud_status_controller.rb
129
+ - app/controllers/foreman_inventory_upload/missing_hosts_controller.rb
129
130
  - app/controllers/foreman_inventory_upload/reports_controller.rb
130
131
  - app/controllers/foreman_inventory_upload/tasks_controller.rb
131
132
  - app/controllers/foreman_inventory_upload/uploads_controller.rb